public function register($handledErrors = E_ALL)
    {
        $errHandler = [$this, 'handleError'];
        $exHandler = [$this, 'handleException'];

        $handledErrors = is_int($handledErrors) ? $handledErrors : E_ALL;

        set_error_handler($errHandler, $handledErrors);
        set_exception_handler($exHandler);

        return $this;
    }