Class BeErrorCode
Default Error Code object.
It is responsible for:
- check if the error code passed is valid (fallback on GENERIC_ERROR)
- handle error code returning the code and info about error
You can create custom error code objects but custom class should always extend this one.
The name of the custom class MUST be the camelized version of the error code lower cased.
For example to handle UPLOAD_QUOTA_EXCEEDED
error code you need to create the class
class UploadQuotaExceeded extends BeErrorCode {}
Located at libs/errors/codes/be_error_code.php
Methods summary
public
|
#
__construct( string $errorCode = '', array $info = array() )
Constructor. Set error code and info if it is valid. |
public
array
|
#
validCodes( )
Initialize the array of valid codes |
protected
array
|
#
loadErrorCodes( string $filePath )
Load a file containing error codes adding them to those already presents |
public
string
|
|
public
array
|