using System;
using System.Runtime.Serialization;
namespace Chernobyl.Resources
{
///
/// An exception that is invoked when an
/// is unable to pass along a resource request to its
///
/// because it does not exist.
///
public class NoResourceProcessorException : Exception
{
///
/// Initializes a new instance of the
/// class that uses a default
/// message specified by as it its
/// .
///
public NoResourceProcessorException() : base(DefaultMessage)
{}
///
/// Initializes a new instance of the
/// class.
///
/// The message that describes the error.
public NoResourceProcessorException(string message) : base(message)
{ }
///
/// Initializes a new instance of the
/// class.
///
/// The that holds
/// the serialized object data about the exception being thrown.
/// The that
/// contains contextual information about the source or destination.
/// The
/// parameter is null.
/// The class name is null or
/// is zero (0).
public NoResourceProcessorException(SerializationInfo info, StreamingContext context) : base(info, context)
{ }
///
/// Initializes a new instance of the
/// class.
///
/// The error message that explains the reason for
/// the exception.
/// The exception that is the cause of the
/// current exception, or a null reference (Nothing in Visual Basic) if
/// no inner exception is specified.
public NoResourceProcessorException(string message, Exception innerException) : base(message, innerException)
{ }
///
/// The message that is used by default when the constructor with no
/// arguments is used.
///
public const string DefaultMessage = "A resource could not be processed " +
"because no IResourceProcessor " +
"exists that can handle it.";
}
}