PHP errors Catcher module for

v1.1.1 2018-01-26 15:15 UTC


PHP errors Catcher module for


Register an account and get a project token.

Install module

Use composer to install Catcher

$ composer require codex-team/hawk.php
$ composer install

Download and require php file

You can download this repository and require Hawk.php file in your project.

require './hawk.php/src/Hawk.php';

Init HawkCatcher

Create an instance with token to the entry point of your project (usually index.php or bootstrap.php).


You can store token in the environment file


Custom Hawk server

If you want to use custom Hawk server then pass a url to this catcher.


Enable handlers

If you want to catch error automatically run the following command with boolean params to enable some handlers.

    TRUE,       // exceptions
    TRUE,       // errors
    TRUE        // shutdown

By default Hawk will catch everything. You can run function with no params.


Catch exception

You can catch exceptions by yourself without enabling handlers.

try {
    throw new Exception("Error Processing Request", 1);
} catch (Exception $e) {



Report a bug:

Composer Package:

CodeX Team: