Skip to content

PgQueryCanceledException

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Represents PostgreSQL query cancellation, which remains pending until the managed callback returns.

public sealed class PgQueryCanceledException : OperationCanceledException, ISerializable

Catching this exception permits managed cleanup but cannot turn a canceled query into success. The native boundary preserves SQLSTATE 57014 and the original PostgreSQL diagnostics. A worker’s RunTransaction(Action) aborts before returning this exception to its caller, which may then start a new transaction.

Inheritance: object, Exception, SystemException, OperationCanceledException

Implements: ISerializable

Creates a query cancellation with the default message.

public PgQueryCanceledException()

Creates a query cancellation with a message.

public PgQueryCanceledException(string message)

Parameters:

message — string

The cancellation message.

PgQueryCanceledException(string, Exception?)

Section titled “PgQueryCanceledException(string, Exception?)”

Creates a query cancellation with a managed cause.

public PgQueryCanceledException(string message, Exception? innerException)

Parameters:

message — string

The cancellation message.

innerException — Exception

The original cause, if any.

Gets the original SQLSTATE, message, positions and optional PostgreSQL diagnostic fields.

public PgException Diagnostic { get; }

Value: PgException