protected function isFatal($lastError)
    {
        return
            !is_null($lastError) &&
            in_array($lastError['type'], self::$fatalErrors, true) &&
            // don't log uncaught exceptions as they were handled by exceptionHandler()
            !(isset($lastError['message']) &&
              strpos($lastError['message'], 'Uncaught') === 0);
    }