/// <summary> /// Initializes a new instance of the <see cref="ValidationException"/> class. /// </summary> /// <param name="message"> /// The message to associate with the exception. /// </param> /// <param name="errorCode"> /// The error code for the exception. If not provided defaults to Warning/Application/Validation /// </param> public ValidationException(string message, ErrorCode errorCode = null) : base(message, errorCode) { if (errorCode == null) { this.ErrorCode = GetDefaultErrorCode(); } }
/// <summary> /// Initializes a new instance of the <see cref="BaseException"/> class. /// </summary> /// <param name="message"> /// The exception message. /// </param> /// <param name="errorCode"> /// The error code for the exception class. /// </param> protected BaseException(string message, ErrorCode errorCode) : base(message) { this.ErrorCode = errorCode; if (errorCode == null) { this.ErrorCode = GetDefaultErrorCode(); } }
/// <summary> /// Initializes a new instance of the <see cref="ErrorCodeAttribute"/> class. /// </summary> /// <param name="severity"> /// The severity of the error to associate with this validation. /// </param> /// <param name="category"> /// The category of the error to associate with this validation. /// </param> public ErrorCodeAttribute(Severity severity, ErrorCategory category) { this.m_ErrorCode = new ErrorCode(severity, category, ErrorType.Validation); }
/// <summary> /// Initializes a new instance of the <see cref="InterceptedException"/> class. /// </summary> /// <param name="message"> /// The message to associate with this exception. /// </param> /// <param name="errorCode"> /// The error code for the exception. /// </param> public PropogatedException(string message, ErrorCode errorCode = null) : base(message, errorCode) { }
/// <summary> /// Initializes a new instance of the <see cref="InterceptedException"/> class. /// </summary> /// <param name="message"> /// The message to associate with this exception. /// </param> /// <param name="errorCode"> /// The error code for the exception. /// </param> public InterceptedException(string message, ErrorCode errorCode = null) : base(message, errorCode) { }