DBError

About

The DBError class is a subclass of Error that is used to encapsulate errors that occur in the database. 4D errors whose error codes indicate the error is related to the database engine are thrown as DBError objects.

API

constructor()

constructor(message : Text; errorCode : Integer; table : 4D.DataClass { ; field : DataClassAttribute })

Creates a new DBError object with .table and .field properties that indicate which table and field caused the error. field should be an attributeopen in new window of table.


.description()

.description() : Text

Returns the result of Error.description() along with the name of the table and field that caused the error (if set).


.field

.field : DataClassAttributeopen in new window

The attribute of the table that caused the error, or null if field was not passed to the constructor. This property is read-only.


.table

.table : 4D.DataClassopen in new window

The table that caused the error. This property is read-only.

Last Updated:
Contributors: Aparajita