Table of Contents

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

statusCode int

The HTTP status code associated with the exception.

message string

The error message describing the exception.

innerException Exception

The 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

message string

The 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

message string

The error message describing the exception.

innerException Exception

The 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

setting string

The name of the configuration setting that caused the exception.

statusCode int?

The HTTP status code associated with the exception. If not provided, defaults to 500.

message string

The error message describing the exception. If not provided, a default message is constructed using the setting.

innerException Exception

The 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.