Skip to content

Commit

Permalink
Improve error msg when script file cannot be read [ci fast]
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
  • Loading branch information
pditommaso committed Jul 3, 2022
1 parent 762e93f commit 52c2780
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,12 @@ class ScriptParser {

ScriptParser runScript(Path scriptPath) {
this.scriptPath = scriptPath
runScript(scriptPath.text)
try {
runScript(scriptPath.text)
}
catch (IOException e) {
throw new ScriptCompilationException("Unable to read script: '$scriptPath' -- cause: $e.message", e)
}
return this
}

Expand Down

0 comments on commit 52c2780

Please sign in to comment.