private String getParseExceptionMessage(ParseException exception) {

        Throwable cause = exception.getCause();

        if (cause == null) {
            return exception.getMessage();
        }

        return cause.getMessage();
    }
Mark all dirty nodes as Syntax error
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/parser/schema/IdentifyDirtySchemaNodes.java