2

Occasionally HtmlUnit stumbles upon a JavaScript error so grave it brings down the entire application.

Here's the long stacktrace it spits out: http://pastie.org/806625

I have already set the webClient not to throw exceptions on script errors, but this doesn't seem to be helping:

webClient.setThrowExceptionOnScriptError(false);

Can anything be done to help Java recover from this exception, so it can continue executing the rest of the application?

2 Answers 2

3

Add below code after initializing the WebClient.

java.util.logging.Logger.getLogger("com.gargoylesoftware.htmlunit").setLevel(Level.OFF);
Sign up to request clarification or add additional context in comments.

Comments

0

And what's the JavaScript code?

If browser works fine with it, then file a bugreport:

http://sourceforge.net/tracker/?group_id=47038&atid=448266

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.