Class IllegalStateException
Thrown when an operation is requested that is invalid given the current state of the object or client. Use this exception to indicate that the requested action cannot be performed until the object reaches an appropriate state (for example, calling an API method when the connection is closed).
Implements
Inherited Members
Namespace: CodersRealm.AmqpClient
Assembly: CodersRealm.AmqpClient.dll
Syntax
[Serializable]
public class IllegalStateException : AmqpException, ISerializable
Constructors
IllegalStateException()
Initializes a new instance of the IllegalStateException class.
Declaration
public IllegalStateException()
IllegalStateException(string)
Initializes a new instance of the IllegalStateException class with a specified error message.
Declaration
public IllegalStateException(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message that describes the error. |
IllegalStateException(string, Exception)
Initializes a new instance of the IllegalStateException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration
public IllegalStateException(string message, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message that describes the error. |
| Exception | innerException | The exception that is the cause of the current exception. |
IllegalStateException(string, string)
Initializes a new instance of the IllegalStateException class with a specified error message and provider-specific error code.
Declaration
public IllegalStateException(string message, string errorCode)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message that describes the error. |
| string | errorCode | A provider-specific error code associated with the exception. |
IllegalStateException(string, string, Exception)
Initializes a new instance of the IllegalStateException class with a specified error message, provider-specific error code, and a reference to the inner exception that is the cause of this exception.
Declaration
public IllegalStateException(string message, string errorCode, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message that describes the error. |
| string | errorCode | A provider-specific error code associated with the exception. |
| Exception | innerException | The exception that is the cause of the current exception. |