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
icon/buttons/copy
atatus_notify_exception($exception)

Parameter

Parameter Type Description
$exception String/Object (Required) Exception message or an exception object.

Examples

copy
icon/buttons/copy
<?php

try {
    // Your Code ...
} catch (UserNotFoundException ex) {
    if (extension_loaded('atatus')) {
        atatus_notify_exception("Testing Error");
    }
    // Handle normally.
}
copy
icon/buttons/copy
<?php

function example_exception_handler(ex) {
    if (extension_loaded('atatus')) {
        atatus_notify_exception(ex);
    }
    // Add your code here.
}