protected function writeError(array $record)
    {
        $exception = new WhoopsErrorException(
            $record['message'],
            $record['level'],
            0,
            $record['context']['file'],
            $record['context']['line']
        );

        $this->writeException($exception);
    }