Class ConfigurationException
- Namespace
- Excalibur.Dispatch.Exceptions
- Assembly
- Excalibur.Dispatch.dll
Exception thrown when configuration-related errors occur.
public sealed class ConfigurationException : DispatchException, ISerializable
- Inheritance
-
ConfigurationException
- Implements
- Inherited Members
- Extension Methods
Constructors
ConfigurationException()
Initializes a new instance of the ConfigurationException class.
public ConfigurationException()
ConfigurationException(string)
Initializes a new instance of the ConfigurationException class with a specified error message.
public ConfigurationException(string message)
Parameters
messagestringThe error message that explains the reason for the exception.
ConfigurationException(string, Exception)
Initializes a new instance of the ConfigurationException class with a specified error message and a reference to the inner exception.
public ConfigurationException(string message, Exception innerException)
Parameters
messagestringThe error message that explains the reason for the exception.
innerExceptionExceptionThe exception that is the cause of the current exception.
ConfigurationException(string, string)
Initializes a new instance of the ConfigurationException class with an explicit error code.
public ConfigurationException(string errorCode, string message)
Parameters
errorCodestringThe error code to associate with the exception.
messagestringThe error message that explains the reason for the exception.
ConfigurationException(string, string, Exception?)
Initializes a new instance of the ConfigurationException class with an explicit error code and inner exception.
public ConfigurationException(string errorCode, string message, Exception? innerException)
Parameters
errorCodestringThe error code to associate with the exception.
messagestringThe error message that explains the reason for the exception.
innerExceptionExceptionThe exception that is the cause of the current exception.
Methods
Invalid(string, object?, string)
Creates a configuration invalid exception.
public static ConfigurationException Invalid(string configKey, object? value, string reason)
Parameters
configKeystringThe configuration key that has an invalid value.
valueobjectThe invalid value.
reasonstringThe reason why the value is invalid.
Returns
- ConfigurationException
A new ConfigurationException instance.
Missing(string)
Creates a configuration missing exception.
public static ConfigurationException Missing(string configKey)
Parameters
configKeystringThe configuration key that is missing.
Returns
- ConfigurationException
A new ConfigurationException instance.
PipelineMisconfiguration(string, string)
Creates a pipeline misconfiguration exception.
public static ConfigurationException PipelineMisconfiguration(string pipelineName, string reason)
Parameters
pipelineNamestringThe name of the misconfigured pipeline.
reasonstringThe reason for the misconfiguration.
Returns
- ConfigurationException
A new ConfigurationException instance.
SectionNotFound(string)
Creates a configuration section not found exception.
public static ConfigurationException SectionNotFound(string sectionName)
Parameters
sectionNamestringThe name of the configuration section that was not found.
Returns
- ConfigurationException
A new ConfigurationException instance.