using System;
namespace RestEase.Implementation
{
///
/// Exception thrown if an interface implementation cannot be created
///
public class ImplementationCreationException : Exception
{
///
/// Gets the code of this error
///
public DiagnosticCode Code { get; } = DiagnosticCode.None;
///
/// Initialises a new instance of the class
///
/// Code of this error
/// Message to use
public ImplementationCreationException(DiagnosticCode code, string message)
: base(message)
{
this.Code = code;
}
///
/// Initialises a new instance of the class
///
/// Message to use
public ImplementationCreationException(string message)
: base(message)
{ }
///
/// Initialises a new instance of the class
///
/// Message to use
/// InnerException to use
public ImplementationCreationException(string message, Exception innerException)
: base(message, innerException)
{ }
}
}