An open API service indexing awesome lists of open source software.

https://github.com/spameri/arraycatch

Catch exceptions of undefined array fields instead of crash.
https://github.com/spameri/arraycatch

Last synced: about 1 year ago
JSON representation

Catch exceptions of undefined array fields instead of crash.

Awesome Lists containing this project

README

          

# ArrayCatch
Catch exceptions of undefined array fields instead of crash.

## Usage
```php?start_inline=true
set_error_handler('handleError');

$data = [];
try {
echo $data['test'];

} catch (ArrayFieldNotSet $exception) {
echo $exception->getMessage();
}

restore_error_handler();

```