|
using System;
using System.Text;
using System.Security.Permissions;
using System.Runtime.Serialization;
[Serializable]
public sealed class BERDecodeException : Exception, ISerializable
{
private int m_position;
public int Position
{ get { return m_position; } }
public override string Message
{
get
{
StringBuilder sb = new StringBuilder(base.Message);
sb.AppendFormat(" (Position {0}){1}",
m_position, Environment.NewLine);
return sb.ToString();
}
}
public BERDecodeException()
: base() { }
public BERDecodeException(String message)
: base(message) { }
public BERDecodeException(String message, Exception ex)
: base(message, ex) { }
public BERDecodeException(int position)
{ m_position = position; }
public BERDecodeException(String message, int position)
: this( message ) { m_position = position; }
public BERDecodeException(int position, Exception ex)
: this( "", ex ) { m_position = position; }
public BERDecodeException(String message, int position, Exception ex)
: this(message, ex) { m_position = position; }
private BERDecodeException(SerializationInfo info, StreamingContext context)
: base( info, context)
{
m_position = info.GetInt32("Position");
}
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("Position", m_position);
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.