Class InvalidConfigurationException
- Namespace
- Excalibur.Domain.Exceptions
- Assembly
- Excalibur.Domain.dll
Represents an exception that occurs when a configuration setting is invalid or missing.
public sealed class InvalidConfigurationException : ApiException, ISerializable
- Inheritance
-
InvalidConfigurationException
- Implements
- Inherited Members
Constructors
InvalidConfigurationException()
Initializes a new instance of the InvalidConfigurationException class with a default error message.
public InvalidConfigurationException()
InvalidConfigurationException(int, string?, Exception?)
Initializes a new instance of the InvalidConfigurationException class with a specified status code, message, and inner exception.
public InvalidConfigurationException(int statusCode, string? message, Exception? innerException)
Parameters
statusCodeintThe HTTP status code associated with the exception.
messagestringThe error message describing the exception.
innerExceptionExceptionThe exception that caused the current exception.
InvalidConfigurationException(string)
Initializes a new instance of the InvalidConfigurationException class with a specified error message.
public InvalidConfigurationException(string message)
Parameters
messagestringThe error message describing the exception.
InvalidConfigurationException(string, Exception?)
Initializes a new instance of the InvalidConfigurationException class with a specified error message and an inner exception.
public InvalidConfigurationException(string message, Exception? innerException)
Parameters
messagestringThe error message describing the exception.
innerExceptionExceptionThe exception that caused the current exception.
InvalidConfigurationException(string, int?, string?, Exception?)
Initializes a new instance of the InvalidConfigurationException class with the name of the problematic setting, an optional status code, an optional error message, and an optional inner exception.
public InvalidConfigurationException(string setting, int? statusCode = null, string? message = null, Exception? innerException = null)
Parameters
settingstringThe name of the configuration setting that caused the exception.
statusCodeint?The HTTP status code associated with the exception. If not provided, defaults to 500.
messagestringThe error message describing the exception. If not provided, a default message is constructed using the
setting.innerExceptionExceptionThe exception that caused the current exception.
Properties
Setting
Gets or sets the name of the configuration setting that caused the exception.
public string Setting { get; }
Property Value
- string
The name of the configuration setting that caused the exception.