HHH-13673 Cryptic error when providing import.sql file without a terminal char at the end of each line

This commit is contained in:
Andrea Boriero 2019-10-07 15:30:24 +01:00 committed by Sanne Grinovero
parent 8f68a3573e
commit f39d96f9fa
1 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,10 @@ options {
public void throwExceptionIfErrorOccurred() {
if ( errorHandler.hasErrors() ) {
String errorMessage = errorHandler.getErrorMessage();
if(errorMessage.contains("expecting STMT_END")) {
throw new StatementParserException( "Import script Sql statements must terminate with a ';' char" );
}
throw new StatementParserException( errorHandler.getErrorMessage() );
}
}