Class SessionClosedException
- Namespace
- PushTechnology.ClientInterface.Client.Session
- Assembly
- Diffusion.Client.dll
The exception indicating a ISession closure.
public class SessionClosedException : SessionException, ISerializable
- Inheritance
-
SessionClosedException
- Implements
- Derived
- Inherited Members
Examples
Catching the exception and printing its message on the terminal.
try {
// Some call that might throw a SessionClosedException
} catch ( SessionClosedException ex ) {
Console.WriteLine( $"[ERROR] {ex.Message}" );
}
Remarks
No further operations are possible when this exception has been thrown.
Added in 5.0.
Constructors
SessionClosedException()
Initializes a new SessionClosedException instance.
public SessionClosedException()
Examples
Creating a new instance.
var exception = new SessionClosedException();
Remarks
Added in 5.0.
SessionClosedException(Exception)
Initializes a new SessionClosedException instance.
public SessionClosedException(Exception inner)
Parameters
innerExceptionThe exception that is the cause for this exception.
Examples
Creating a new instance.
// innerException is a previously created exception instance.
var exception = new SessionClosedException( innerException );
Remarks
Added in 6.8.
SessionClosedException(string)
Initializes a new SessionClosedException instance.
public SessionClosedException(string message)
Parameters
messagestringThe exception message.
Examples
Creating a new instance.
var exception = new SessionClosedException( "The error message." );
Remarks
Added in 5.0.
SessionClosedException(string, Exception)
Initializes a new SessionClosedException instance.
public SessionClosedException(string description, Exception inner)
Parameters
descriptionstringThe description of the exception.
innerExceptionThe exception that is the cause for this exception.
Examples
Creating a new instance.
// innerException is a previously created exception instance.
var exception = new SessionClosedException( "The error description.", innerException );
Remarks
Added in 5.0.