Skip to content

Commit

Permalink
Improve "Unexpected input: '{'" error message
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Jul 21, 2023
1 parent 9fc1d3b commit 548a5d8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ class ScriptParser {
msg = msg != 'startup failed' ? msg : header
msg = msg.replaceAll(/startup failed:\n/,'')
msg = msg.replaceAll(~/$clazzName(: \d+:\b*)?/, header+'\n- cause:')
if( msg.contains "Unexpected input: '{'" ) {
msg += "\nNOTE: If this is the beginning of a process or workflow, there may be a syntax error in the body, such as a missing or extra comma, for which a more specific error message could not be produced."
}
throw new ScriptCompilationException(msg, e)
}
}
Expand Down

0 comments on commit 548a5d8

Please sign in to comment.