The problem is you've violated a Declare and Handle rules.
See my comments in code below for more insight...hope it help.
Go back and reread Chapter 5, page 415 on "Rethrowing the Same Exception (Exam Objectives 2.4 and 2.5)" topic to reinforce and confirm your knowledge.
Here is a brief recap from K & B book:
All other catch clauses associated with the same try are ignored, if a finally
block exists, it runs, and the exception is thrown back to the calling method (the
next method down the call stack). If you throw a checked exception from a catch
clause, you must also declare that exception! In other words, you must handle and
declare, as opposed to handle or declare. The following example is illegal:
In the preceding code, the doStuff() method is clearly able to throw a checked
exception—in this case an IOException—so the compiler says, "Well, that's just
peachy that you have a try/catch in there, but it's not good enough. If you might
rethrow the IOException you catch, then you must declare it!"
"Your life is in your hands, to make of it what you choose."
Joined: Sep 27, 2011
I get it now..
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: please explain the output of the code below