Skip to content

Commit

Permalink
fixed: imagefile missing: aborting should report the failing line in …
Browse files Browse the repository at this point in the history
…Java programs too
  • Loading branch information
RaiMan committed Jul 11, 2018
1 parent 6d2f011 commit dc855c6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions API/src/main/java/org/sikuli/script/RunTime.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,15 @@ public static void pause(float time) {

protected void abortScripting(String msg1, String msg2) {
Thread current = Thread.currentThread();
String where = "unknown";
String where = "";
if (Region.runTime.isJythonReady) {
where = JythonHelper.get().getCurrentLine();
log(-1, msg2);
log(-1, msg1 + " %s", where);
}
if (where.isEmpty()) {
throw new RuntimeException(msg2);
}
log(-1, msg1 + " %s", where);
log(-1, msg2);
current.interrupt();
current.stop();
}
Expand Down

0 comments on commit dc855c6

Please sign in to comment.