Sql Exception
General exception class for the interpreter.
Three configurations for an SqlException
Provide a message and optionally a cause
Used when an error occurs and we can only provide a general human friendly text message
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
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
the message for this exception
the error code for this exception
context for this error, includes details like line & character offsets, among others.
for this exception
Constructors
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.
Functions
Auto-generated message has the structure
Same as generateMessage but without the location.