Skip to content

PgRemoteException

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Reports a command that failed on the server at the other end of a PgReplicationConnection.

public sealed class PgRemoteException : Exception, ISerializable

The failure happened on the server, so this backend’s transaction is unaffected and the connection stays usable.

Inheritance: object, Exception

Implements: ISerializable

Creates an exception with a generic message.

public PgRemoteException()

Creates an exception with the server’s message.

public PgRemoteException(string message)

Parameters:

message — string

The server’s message.

Creates an exception with the server’s message and an inner exception.

public PgRemoteException(string message, Exception? innerException)

Parameters:

message — string

The server’s message.

innerException — Exception

The exception that caused this one.

Creates an exception with the server’s SQLSTATE and message.

public PgRemoteException(string? sqlState, string message)

Parameters:

sqlState — string

The server’s five-character SQLSTATE, or null when the server’s version does not report it to PostgreSQL 13.

message — string

The server’s message.

Gets the server’s five-character SQLSTATE, or null when it was not reported.

public string? SqlState { get; }

Value: string