Table of Contents
By default, Atomik won't catch any exceptions or errors, PHP's normal behavior preval. However it is possible to enable error catching so you can display an error page to the user or error reports while developing.
The “atomik/catch_errors” configuration key must be set to true for Atomik to catch errors. Errors and exceptions are treated the same way.
By default, an error report will be displayed. The report can be hidden for security purpose by setting false to the “atomik/display_errors” configuration key.
A custom error page can be used as explain in the configuration chapter.
Atomik's only provides a simple method named Atomik::debug()
which
is an alias for var_dump()
. However the method output can be hidden
by modifying the “debug” configuration key.
Example 11.1. Using Atomik::debug()
Atomik::debug($myVar); Atomik::set('debug', false); Atomik::debug($myVar2); // no output Atomik::debug($myVar2, true); // use true to force the output even if debug set to false