TransferException
using System;
using System.Runtime.Serialization;
namespace Relativity.Transfer
{
[Serializable]
public class TransferException : Exception
{
public bool Fatal { get; }
public TransferException()
: this(false)
{
}
public TransferException(bool fatal)
{
Fatal = fatal;
}
public TransferException(string message)
: this(message, false)
{
}
public TransferException(string message, bool fatal)
: base(message)
{
Fatal = fatal;
}
public TransferException(string message, Exception innerException)
: this(message, innerException, false)
{
}
public TransferException(string message, Exception innerException, bool fatal)
: base(message, innerException)
{
Fatal = fatal;
}
protected TransferException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Fatal = info.GetBoolean("Fatal");
}
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (info == null)
throw new ArgumentNullException("info");
info.AddValue("Fatal", Fatal);
base.GetObjectData(info, context);
}
}
}