Errors and warnings

NCP errors and warnings.

API reference

exception ncplib.NCPError

Base class for all exceptions thrown by ncplib.

exception ncplib.NetworkError

Raised when an NCP Connection cannot connect, or disconnects unexpectedly.

exception ncplib.AuthenticationError

Raised when an NCP Connection cannot authenticate.

exception ncplib.NetworkTimeoutError

Raised when an NCP Connection times out while performing network activity.

exception ncplib.ConnectionClosed

Raised when an NCP Connection is closed gracefully.

exception ncplib.CommandError(field: Field, detail: str, code: int)

Raised by the NCP client when the NCP server sends a NCP field containing an ERRO parameter.

Can be disabled by setting auto_erro to False in ncplib.connect().

field

The ncplib.Field that triggered the error.

detail

The human-readable str message from the server.

code

The int code from the server,

exception ncplib.DecodeError

Raised when a non-recoverable error was encountered in a NCP packet.

exception ncplib.CommandWarning(field: Field, detail: str, code: int)

Issued by the NCP client when the NCP server sends a NCP field containing a WARN parameter.

Can be disabled by setting auto_warn to False in ncplib.connect().

field

The ncplib.Field that triggered the error.

detail

The human-readable str message from the server.

code

The int code from the server,

exception ncplib.DecodeWarning

Issued when a recoverable error was encountered in a NCP packet.