Table of Contents

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

message string

The 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

description string

The description of the exception.

innerException Exception

The 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.