\TriTan\ExceptionInvalidJsonException

Tritan CMS Exception Class

This extends the default LitenException class to allow converting exceptions to and from Error objects.

Unfortunately, because an Error object may contain multiple messages and error codes, only the first message for the first error code in the instance will be accessible through the exception's methods.

Summary

Methods
Properties
Constants
__construct()
get_ttcms_error()
No public properties found
No constants found
No protected methods found
$code
$ttcms_error
N/A
No private methods found
No private properties found
N/A

Properties

$code

$code : string

TriTan CMS handles string error codes.

Type

string

$ttcms_error

$ttcms_error : \TriTan\Exception\TriTan\Error

Error instance.

Type

\TriTan\Exception\TriTan\Error

Methods

__construct()

__construct(string  $message = '', string  $code = '',   $previous = null) 

TriTan CMS exception constructor.

The class constructor accepts either the framework \Liten\Exception\LitenException creation parameters or an TriTan\Error instance in place of the previous exception.

If an TriTan\Error instance is given in this way, the $message and $code parameters are ignored in favour of the message and code provided by the TriTan\Error instance.

Depending on whether an TriTan\Error instance was received, the instance is kept or a new one is created from the provided parameters.

Parameters

string $message

Exception message (optional, defaults to empty).

string $code

Exception code (optional, defaults to empty).

$previous

get_ttcms_error()

get_ttcms_error() : \TriTan\Exception\`Error`

Obtain the exception's `TriTan\Error` object.

Returns

\TriTan\Exception\`Error` —

TriTan CMS error.