NetworkException

class NetworkException(val reason: NetworkExceptionReason, val details: String? = null, cause: Throwable? = null, sqlState: String? = "08006", serverErrorMessage: ServerErrorMessage? = null) : OctaviusException

Exception thrown when a network error disrupts communication with the database server.

This can occur during active queries or while the connection is idle, typically resulting from broken pipes, connection timeouts, or sudden closures by the server or intermediary network devices.

Parameters

cause

The underlying exception that caused this failure, if any.

sqlState

The SQL state code returned by the database, if available.

serverErrorMessage

The original error message from the database server, if available.

Constructors

Link copied to clipboard
constructor(reason: NetworkExceptionReason, details: String? = null, cause: Throwable? = null, sqlState: String? = "08006", serverErrorMessage: ServerErrorMessage? = null)

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard

Additional, human-readable details about the failure.

Link copied to clipboard
open val message: String?
Link copied to clipboard

The context of the query that resulted in this exception, if applicable.

Link copied to clipboard

The specific type of network failure.

Link copied to clipboard

The raw error message received from the database, if applicable.

Link copied to clipboard

The SQL state code associated with the error, if applicable.

Functions

Link copied to clipboard

Finds the Octavius failure behind this throwable, if there is one.

Link copied to clipboard
open override fun getDetailedMessage(): String

Provides a detailed, human-readable description of the error.

Link copied to clipboard
open override fun toString(): String