Class SessionException
The exception indicating a ISession specific failure.
Inheritance
SessionException
Namespace: PushTechnology.ClientInterface.Client.Session
Assembly: Diffusion.Client.dll
Syntax
public class SessionException : Exception
Remarks
This exception can be thrown by any of the API methods that interact with the server.
Added in 6.0.
Examples
Catching the exception and printing its message on the terminal.
try {
// Some call that might throw a SessionException
} catch ( SessionException ex ) {
Console.WriteLine( $"[ERROR] {ex.Message}" );
}
Constructors
SessionException(String)
Initializes a new SessionException instance.
Declaration
public SessionException(string message)
Parameters
Type | Name | Description |
---|---|---|
String | message | The exception message. |
Remarks
Added in 6.0.
Examples
Creating a new instance.
var exception = new SessionException( "The error message." );
SessionException(String, Exception)
Initializes a new SessionException instance.
Declaration
public SessionException(string description, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
String | description | The description of the exception. |
Exception | innerException | The exception that is the cause for this exception. |
Remarks
Added in 6.0.
Examples
Creating a new instance.
// innerException is a previously created exception instance.
var exception = new SessionException( "The error description.", innerException );