Class SessionException
- Namespace
- PushTechnology.ClientInterface.Client.Session
- Assembly
- Diffusion.Client.dll
The exception indicating a ISession specific failure.
public class SessionException : Exception, ISerializable
- Inheritance
-
SessionException
- Implements
- Derived
- Inherited Members
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}" );
}
Remarks
This exception can be thrown by any of the API methods that interact with the server.
Added in 6.0.
Constructors
SessionException(string)
Initializes a new SessionException instance.
public SessionException(string message)
Parameters
messagestringThe exception message.
Examples
Creating a new instance.
var exception = new SessionException( "The error message." );
Remarks
Added in 6.0.
SessionException(string, Exception)
Initializes a new SessionException instance.
public SessionException(string description, Exception innerException)
Parameters
descriptionstringThe description of the exception.
innerExceptionExceptionThe exception that is the cause for this exception.
Examples
Creating a new instance.
// innerException is a previously created exception instance.
var exception = new SessionException( "The error description.", innerException );
Remarks
Added in 6.0.