inc\classes\apiException.php
File, that contains throwable
- Author
- Sergey Dilong
- License
- GPL-2.0
- Package
- Temply-Account\Core
\apiException
Package: Temply-Account\Core
Parameters
Details
Returns
Details
Custom exception
Terminates the script and displays error, if wasn't catched
- Parent(s)
- \Exception
- Author
- Sergey Dilong
- License
- GPL-2.0
Properties

array $o = array()Additional options
Default value
array()Details- Type
- array
- See
- Get this field outside the class
Methods

__construct(integer $code, array $o = array()) : voidThrow the Exception
Define APIError code and options to terminate the script and show an error message to user
It's used to stop execution and show an error to user if happens something critical. In some cases classes/methods/functions (such as class User) can throw this object. If you would like to prevent terminating and error displaying you can catch the exception
| Name | Type | Description |
|---|---|---|
| $code | integer | API Error code |
| $o | array | Additional fields for error |
- Example
- The Exception could be throwed by statements
- Example
- Catching an exception to do other tasks
- See
- Error init
- See
- Get error message

getAPICode() : integerError Code
Get Error code, which was provided by Exception thrower. Used for internal purposes.
| Type | Description |
|---|---|
| integer | The API Error code |