Error
in package
Class Error
Handle errors in a standard way, so that they are returned through the API.
Table of Contents
- $code : int
- Internal error code.
- $id : string|int
- Processor ID.
- $message : string
- Error message.
- __construct() : mixed
- Error constructor.
- process() : DataContainer
- Construct and return the output error message
Properties
$code
Internal error code.
private
int
$code
Error code.
$id
Processor ID.
private
string|int
$id
Processor ID.
$message
Error message.
private
string
$message
Error message.
Methods
__construct()
Error constructor.
public
__construct(int $code, string|int $id, string $message) : mixed
Parameters
- $code : int
-
Error code.
- $id : string|int
-
Processor ID.
- $message : string
-
Error message.
Return values
mixed —process()
Construct and return the output error message
public
process() : DataContainer
Tags
Return values
DataContainer —Result of the processor.