Skip to content

Catch exceptions of undefined array fields instead of crash.

Notifications You must be signed in to change notification settings

Spameri/ArrayCatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

ArrayCatch

Catch exceptions of undefined array fields instead of crash.

Usage

set_error_handler('handleError');

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

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

restore_error_handler();

About

Catch exceptions of undefined array fields instead of crash.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages