Skip to content

Commit

Permalink
fix: throw proper exception when executeScript fails.
Browse files Browse the repository at this point in the history
 This happens e.g. when JXBrowser has crashed.
  • Loading branch information
Stephan Wald authored and hyyan committed Oct 13, 2023
1 parent 940fc70 commit bc926e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions GxExecutor.bbj
Expand Up @@ -368,13 +368,16 @@ class public GxExecutor

if widget!.getHTMLView().isDestroyed() <> BBjAPI.TRUE then
if(async!)
widget!.getHTMLView().executeAsyncScript(script!)
widget!.getHTMLView().executeAsyncScript(script!, err=browser_err)
else
result! = widget!.getHTMLView().executeScript(script!)
result! = widget!.getHTMLView().executeScript(script!, err=browser_err)
fi
fi

methodret result!

browser_err:
throw "Error executing script.",60
methodend
rem /**
rem * Start count down timer
Expand Down

0 comments on commit bc926e7

Please sign in to comment.