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 attribute 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 : DataClassAttribute
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.DataClass
The table that caused the error. This property is read-only.