class CiviCRM_API3_Exception extends Exception

This api exception returns more information than the default one. We are using it rather than API_Exception from the api wrapper as the namespace is more generic

Methods

__construct(string $message, mixed $error_code, array $extraParams = array(), $previous = NULL)

Class constructor.

string
__toString()

Custom string representation of object.

mixed
getErrorCode()

Get error code.

array
getExtraParams()

Get extra parameters.

Details

at line 109
__construct(string $message, mixed $error_code, array $extraParams = array(), $previous = NULL)

Class constructor.

Parameters

string $message The human friendly error message.
mixed $error_code A computer friendly error code. By convention, no space (but underscore allowed) (ex: mandatory_missing, duplicate, invalid_format).
array $extraParams Extra params to return. eg an extra array of ids. It is not mandatory, but can help the computer using the api. Keep in mind the api consumer isn't to be trusted. eg. the database password is NOT a good extra data.
$previous A previous exception which caused this new exception.

at line 119
string __toString()

Custom string representation of object.

Return Value

string

at line 128
mixed getErrorCode()

Get error code.

Return Value

mixed

at line 137
array getExtraParams()

Get extra parameters.

Return Value

array