protected function throwException($message)
    {
        $path = $this->getPath();
        $exception = new ReaderException(
            new SourceLocation(null, $this->line, $this->offset),
            sprintf(
                "Failed to read: %s \nNear: %s%s\nLine: %s \nOffset: %s \nPosition: %s",
                $message,
                $this->peek(20),
                $path ? "\nFile: $path" : '',
                $this->line,
                $this->offset,
                $this->position
            )
        );

        throw $exception;
    }