public void throwOnError() throws ParseException {
        for (ParseError e : getProblemCollector()) {
            if (e.getSeverity() == ParseError.Severity.ERROR) {
                throw ParseException.create(getProblemCollector());
            }
        }
    }
public void throwOnError ( ) throws ParseException { for ( ParseError e : getProblemCollector ( ) ) { if ( e . getSeverity ( ) == ParseError . Severity . ERROR ) { throw ParseException . create ( getProblemCollector ( ) ) ; } } }
Throws a {@link ParseException} if an error occurred while parsing the input.
<p>
All warnings which occurred will be ignored.

@throws ParseException if an error occurred while parsing.