Newer Version Available

This content describes an older version of this product. View Latest

Error Class

Contains information about an error that occurred during a DML operation when using a Database method.

Namespace

Database

Error Methods

The following are methods for Error. All are instance methods.

getFields()

Returns an array of one or more field names. Identifies which fields in the object, if any, affected the error condition.

Signature

public String[] getFields()

Return Value

Type: String[]

getMessage()

Returns the error message text.

Signature

public String getMessage()

Return Value

Type: String

getStatusCode()

Returns a code that characterizes the error.

Signature

public StatusCode getStatusCode()

Return Value

Type: StatusCode

Usage

The full list of status codes is available in the WSDL file for your organization (see Downloading Salesforce WSDLs and Client Authentication Certificates in the Salesforce online help.)