Occasionally I'm getting a protocolException error returned, so I wrote a handler to catch it.
I'd like to test that it is being caught and handled correctly. So, I now have a perl script on an apache server that I'm trying to mangle to return something which will generate this error, but all I am managing to do is get a 500 Server Error, or is accepted as a valid return.
How do I generate html code to throw this exception for testing porpoises?
Any thoughts? I really don't want to release untested code.
2009-05-25 16:17:50,341 ERROR [XXXX.web.servlet.controller.BookingController] org.apache.commons.httpclient.ProtocolException: Unable to parse header: 6
Took 10 sips of coffee this mornign before I got what you meant ! (_whap self_)
replace the URL call with a throw exception statement so one is always thrown!
Should have thought of that myself, thanks.
This is why I was always a fan of pub programming, someone in the pub would always spot the obvious you missed before you went off on a complex tangenty and there were plently of beer made for code snippets.
Joined: Oct 13, 2005
Andrew Walmsley wrote: . . . plently of beer . . .
We need a Homer Simpson Aaaaaaaaah! smilie!
subject: How do I generate a org.apache.commons.httpclient.ProtocolException ?