atatus_notify_exception()
function can be used to handle errors and exceptions that are not done automatically.
Compatibility
Compatible with all PHP agent versions.
Syntax
copy
atatus_notify_exception($exception)
Parameter
Parameter | Type | Description |
---|---|---|
$exception | String/Object (Required) | Exception message or an exception object. |
Examples
copy
<?php
try {
// Your Code ...
} catch (UserNotFoundException ex) {
if (extension_loaded('atatus')) {
atatus_notify_exception("Testing Error");
}
// Handle normally.
}
copy
<?php
function example_exception_handler(ex) {
if (extension_loaded('atatus')) {
atatus_notify_exception(ex);
}
// Add your code here.
}