public function registerShutdown()
    {
        if (self::$reservedMemory === null) {
            self::$reservedMemory = str_repeat('x', 10240);
            register_shutdown_function(__CLASS__ . '::handleFatalError');
        }

        self::$exceptionHandler = [$this, 'handleException'];

        return $this;
    }