Preventing Unwanted Stack trace printout
Hi,
My program uses HTML unit and I am getting a stack trace printout when it runs, but the program keeps going as if there was no exception and completes just fine. Is there any way I can disable this print out? I put in a catch ProtocolException block in, but the stack trace keeps printing.
Thanks in advance.
org.apache.commons.httpclient.ProtocolException: The server failed to respond with a valid HTTP responseat org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1846)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:125)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1371)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1329)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:322)
at com.gargoylesoftware.htmlunit.javascript.host.Window.jsxSet_location(Window.java:374)
at com.gargoylesoftware.htmlunit.javascript.host.Document.jsxSet_location(Document.java:454)
at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.put(SimpleScriptable.java:301)
at org.mozilla.javascript.ScriptableObject.putProperty(ScriptableObject.java:1396)
at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1432)
at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1422)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2824)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2250)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:149)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:160)
at org.mozilla.javascript.Context.evaluateString(Context.java:1132)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:249)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:695)
at com.gargoylesoftware.htmlunit.javascript.host.JavaScriptBackgroundJob.run(JavaScriptBackgroundJob.java:106)
at java.lang.Thread.run(Thread.java:534)

