SqlException

open class SqlException(message: String, errorCode: ErrorCode, errorContext: PropertyValueMap, cause: Throwable?) : RuntimeException

General exception class for the interpreter.

Three configurations for an SqlException

  1. Provide a message and optionally a cause

    • Used when an error occurs and we can only provide a general human friendly text message

  2. Provide a message an ErrorCode and context as a PropertyValueMap and optionally a cause

    • Used when an error occurs and we want a custom message as well as an auto-generated message from error code and error context

  3. Provide an ErrorCode and context as a PropertyValueMap and optionally a cause

    • Used when an error occurs and we want an auto-generated message from the given error code and error context

Parameters

message

the message for this exception

errorCode

the error code for this exception

errorContext

context for this error, includes details like line & character offsets, among others.

cause

for this exception

Constructors

Link copied to clipboard
fun SqlException(errorCode: ErrorCode, propertyValueMap: PropertyValueMap, cause: Throwable? = null)

Given the errorCode, error context as a propertyValueMap and optional cause creates an SqlException with an auto-generated error message. This is the constructor for the third configuration explained above.

Link copied to clipboard
fun SqlException(message: String, errorCode: ErrorCode, errorContext: PropertyValueMap, cause: Throwable? = null)

Functions

Link copied to clipboard
fun addSuppressed(p0: Throwable)
Link copied to clipboard
open fun fillInStackTrace(): Throwable
Link copied to clipboard
fun generateMessage(): String

Auto-generated message has the structure

Link copied to clipboard
fun generateMessageNoLocation(): String

Same as generateMessage but without the location.

Link copied to clipboard
open fun getLocalizedMessage(): String
Link copied to clipboard
open fun getStackTrace(): Array<StackTraceElement>
Link copied to clipboard
fun getSuppressed(): Array<Throwable>
Link copied to clipboard
open fun initCause(p0: Throwable): Throwable
Link copied to clipboard
open fun printStackTrace()
open fun printStackTrace(p0: PrintStream)
open fun printStackTrace(p0: PrintWriter)
Link copied to clipboard
open fun setStackTrace(p0: Array<StackTraceElement>)
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
val errorCode: ErrorCode
Link copied to clipboard
val errorContext: PropertyValueMap
Link copied to clipboard
open val internal: Boolean

Indicates if this exception is due to an internal error or not.

Link copied to clipboard
open override var message: String

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard