inc\error_handler.php
Error Handler
Defines function to catch and customize exceptions
- Author
- Sergey Dilong
- Licence
- GPL-2.0
- Package
- Temply-Account\Core
Functions
__ExceptionToArray(\Exception $e) : arrayException To Array
Turnes \Exception object to Array
| Name | Type | Description |
|---|---|---|
| $e | \Exception | Input data |
| Type | Description |
|---|---|
| array | Output array |
- Package
- Temply-Account\Core
_fatalErrorShutdownHandler() : voidFatal Error Shutdown Handler
Extreme output and terminate
- Package
- Temply-Account\Core
_handleError(integer $code, string $description, string $file = null, integer $line = null, array<mixed,string> $context = null) : voidHanlde error
Format, log, terminate
| Name | Type | Description |
|---|---|---|
| $code | integer | Error code |
| $description | string | Description |
| $file | string | File |
| $line | integer | Line |
| $context | array<mixed,string> | Context |
- Package
- Temply-Account\Core
_handleException(\Exception $e) : voidGlobal Exception Handler
Writes logs and terminates, does all apiException's work
| Name | Type | Description |
|---|---|---|
| $e | \Exception | Unhandled exception |
- Package
- Temply-Account\Core
_logError(array $data = array()) : voidWrites report and terminates
Function-helper
| Name | Type | Description |
|---|---|---|
| $data | array | Error array |
- Package
- Temply-Account\Core
- See
- Recommended function