Documentation

CRM_Contribute_Exception_CheckLineItemsException extends CRM_Core_Exception
in package

Class CRM_Contribute_Exception_CheckLineItemsException

Table of Contents

Constants

LINE_ITEM_DIFFERRING_TOTAL_EXCEPTON_MSG  = "Line item total doesn't match total amount."
NOT_IMPLEMENTED  = 'not-found'
UNAUTHORIZED  = 'unauthorized'

Properties

$errorData  : mixed

Methods

__construct()  : mixed
Class constructor.
__toString()  : string
Custom string representation of object.
getErrorCode()  : int|string
Get error code.
getErrorCodes()  : array<string|int, mixed>
Get error codes.
getErrorData()  : array<string|int, mixed>
Return specific error information.
getExtraParams()  : array<string|int, mixed>
Get extra parameters.
getUserMessage()  : string
Get a message suitable to be presented to the user.

Constants

LINE_ITEM_DIFFERRING_TOTAL_EXCEPTON_MSG

public mixed LINE_ITEM_DIFFERRING_TOTAL_EXCEPTON_MSG = "Line item total doesn't match total amount."

NOT_IMPLEMENTED

public mixed NOT_IMPLEMENTED = 'not-found'

UNAUTHORIZED

public mixed UNAUTHORIZED = 'unauthorized'

Properties

Methods

__construct()

Class constructor.

public __construct([mixed $message = self::LINE_ITEM_DIFFERRING_TOTAL_EXCEPTON_MSG ][, mixed $error_code = 0 ][, array<string|int, mixed> $extraParams = [] ][, mixed $previous = NULL ]) : mixed
Parameters
$message : mixed = self::LINE_ITEM_DIFFERRING_TOTAL_EXCEPTON_MSG

The human friendly error message.

$error_code : mixed = 0

A computer friendly error code. By convention, no space (but underscore allowed) (ex: mandatory_missing, duplicate, invalid_format).

$extraParams : array<string|int, mixed> = []
$previous : mixed = NULL

A previous exception which caused this new exception.

__toString()

Custom string representation of object.

public __toString() : string
Return values
string

getErrorCode()

Get error code.

public getErrorCode() : int|string
Return values
int|string

getErrorCodes()

Get error codes.

public getErrorCodes() : array<string|int, mixed>

DIVERGENCE: API_Exception defined a discoverable list of error-codes. CRM_Core_Exception and CiviCRM_API3_Exception did not.

Return values
array<string|int, mixed>

getErrorData()

Return specific error information.

public getErrorData() : array<string|int, mixed>

(Can be used for more detailed error messages or translation.)

This method may be overridden in child exception classes in order to add functionality not present in PEAR_Exception and is a placeholder to define API

The returned array must be an associative array of parameter => value like so:

array('name' => $name, 'context' => array(...))
Return values
array<string|int, mixed>

getExtraParams()

Get extra parameters.

public getExtraParams() : array<string|int, mixed>

Remove in v6.0. Compatibility with older API_Exception/CiviCRM_API3_Exception contracts.

Return values
array<string|int, mixed>

getUserMessage()

Get a message suitable to be presented to the user.

public getUserMessage() : string
Return values
string

        
On this page

Search results