chevere / throwable-handler
Throwable handler for multiple contexts
Installs: 14 689
Dependents: 7
Suggesters: 0
Security: 0
Stars: 9
Watchers: 1
Forks: 1
Open Issues: 7
Requires
- php: ^8.1
- chevere/message: ^1.0.0
- chevere/trace: ^2.0.0
- chevere/var-dump: ^2.0.0
Requires (Dev)
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^9.5
- symplify/easy-coding-standard: ^11.1
This package is auto-updated.
Last update: 2024-11-06 20:09:04 UTC
README
Quick start
Install ThrowableHandler using Composer.
composer require chevere/throwable-handler
Register ThrowableHandler to handle all errors.
use Chevere\ThrowableHandler\ThrowableHandler; set_error_handler(ThrowableHandler::ERROR_AS_EXCEPTION); register_shutdown_function(ThrowableHandler::SHUTDOWN_ERROR_AS_EXCEPTION);
Register your exception handler, you can choose:
ThrowableHandler::PLAIN
ThrowableHandler::CONSOLE
ThrowableHandler::HTML
use Chevere\ThrowableHandler\ThrowableHandler; set_exception_handler(ThrowableHandler::PLAIN);
Demo
Documentation
Documentation is available at chevere.org.
License
Copyright 2024 Rodolfo Berrios A.
Chevere is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.