public ParserError(int lineIndex, String message) {
        if (lineIndex < 0 || message == null) {
            throw new IllegalArgumentException("The line index has to be at least 0, the message may not be null.");
        }

        this.lineIndex = lineIndex;
        this.message = message;
    }