https://github.com/undercloud/exceptor
Exception's flow
https://github.com/undercloud/exceptor
debug debugging error error-handling exception-handling exceptions php
Last synced: 11 months ago
JSON representation
Exception's flow
- Host: GitHub
- URL: https://github.com/undercloud/exceptor
- Owner: undercloud
- Created: 2019-03-31T07:17:30.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-16T19:10:43.000Z (over 4 years ago)
- Last Synced: 2025-01-31T00:18:21.519Z (about 1 year ago)
- Topics: debug, debugging, error, error-handling, exception-handling, exceptions, php
- Language: PHP
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# exceptor
[](https://travis-ci.org/undercloud/exceptor)
Exception's flow
## Install
`composer require undercloud/exceptor`
## Requirements
PHP 5.4+
## Description
Provides a mechanism for catching errors and exceptions in the application flow. All built-in types of errors are transformed into exceptions, which greatly simplifies debugging. It also intercepts errors due to lack of memory and execution timeout.
## Usage
```php
// catch all
error_reporting(E_ALL);
use Undercloud\Exception\FlowHandler;
(new FlowHandler(function(){
try {
// your code
// PHP 5.x
} catch (Exception $e) {
return $e;
// PHP 7.x
} catch (Throwable $e) {
return $e;
}
}))->flow(function($e){
// handle exception
})
```
## Type of Exceptions
* All standard PHP's exceptions
* CompileErrorException
* CompileWarningException
* CoreErrorException
* CoreWarningException
* DeprecatedException
* NoticeException
* ParseException
* RecoverableErrorException
* StrictException
* UserDeprecatedException
* UserErrorException
* UserNoticeException
* UserWarningException
* WarningException
* ExecutionTimeoutException
* OutOfMemoryException
## LICENSE
MIT