0

I'm working on webservices with Axis and among the checked exceptions that its methods declare I have: ServiceException, RemoteException and AxisFault (those depend, of course, on the specific method invoked, so these are not all the relevant exceptions, I know, but that's not the point here).

Doing some tests on my code, I inadvertedly put a long port number on a URL that made the code throw the (unchecked) exception IllegalArgumentException, that I wasn't catching until now.

Now, which are the relevant unchecked exceptions that I must handle, when working withh webservices and with networking in general?
I tried to search on the net, but I keep getting Checked vs unchecked exceptions results.

Any advice? Is there a list or a guide out there?

watery
  • 5,026
  • 9
  • 52
  • 92
  • I've voted to close as "opinon-based". This question is very subjective and the answers depend upon what you are doing. See [Should unchecked exceptions be caught and dealt with?](http://stackoverflow.com/questions/13251368/should-unchecked-exceptions-be-caught-and-dealt-with?rq=1) for example. I'd suggest you read around the subject and reach your own conclusion about your code. – Duncan Jones Jun 17 '14 at 08:01
  • @Duncan Really? I thought that there was at least some list of "common sense" exceptions to know about, at least to decide whether to catch them or not. Actually, if I didn't put that port number I never knew that code could throw that exception. – watery Jun 17 '14 at 08:07
  • You probably need to read the javadocs for all the methods you call. And assuming that the javadocs don't mention all the exceptions (safe assumption), you should probably read all the source code, too. You might save some time just by writing a thorough suite of tests and handling all the exceptions you encounter. – Paul Hicks Jun 17 '14 at 08:50

1 Answers1

1

This image will help you.Meanwhile no need to catch unchecked exceptions.(IllegalArgumentException)

enter image description here

sriram
  • 128
  • 12