PHPackages                             bakame/aide-error - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. bakame/aide-error

ActiveLibrary

bakame/aide-error
=================

A siple class to handle errors in PHP functions

0.2.0(11mo ago)0697—0%1MITPHPPHP ^8.1CI passing

Since Dec 9Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/bakame-php/aide-error)[ Packagist](https://packagist.org/packages/bakame/aide-error)[ GitHub Sponsors](https://github.com/sponsors/nyamsprod)[ RSS](/packages/bakame-aide-error/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (3)Used By (1)

Aide for Errors
===============

[](#aide-for-errors)

A Cloak system to help dealing with error reporting in PHP.

Installation
------------

[](#installation)

### Composer

[](#composer)

```
composer require bakame-php/aide-error

```

### System Requirements

[](#system-requirements)

You need:

- **PHP &gt;= 8.1** but the latest stable version of PHP is recommended

Usage
-----

[](#usage)

Traditionally, to correctly handle errors with PHP's functions, you have two (2) options. Either you use the `@` to suppress the error which is not recommended; or you need to add some boilerplate code around `set_error_handler` and `restore_error_handler`.

The `Bakame\Aide\Error\Cloak` utility class helps you remove that burden by doing the heavy-lifting for you.

```
