When I tried to run this, I got an error stating that ScaryException is a "symbol not found". Can anyone help me on this?
Also it'd be great if someone could point me to a reference if the above code is wrong in theoretically.
ScaryException has to be defined by you.
You can extend any Exception
In you code you can define 3 types of constructors
Maybe this will help http://stackoverflow.com/questions/1754315/how-to-create-custom-exceptions-in-java
Campbell Ritchie wrote:Welcome to the Ranch
It is easy enough to create your own Exception classes; I usually create four constructors.
Rj Rajat Jain: Please quote the page number in HFJ, so we can read the original.
Campbell Richie: I am on a kindle, it does not display the page number, corresponding to the original book. Anyways, my problem has been sorted. Thank you guys!!
Campbell Ritchie wrote:Surely it gives chapter and section numbers which allow us to find the page numbers from the table of contents?
Rj Rajat Jain wrote:. . . I am on a kindle, it does not display the page number, . . .
Yes it does :-). It was Chapter No. 11, in "Finally: for the things you want no matter what"'s Sharpen your Pencil section.
There is a line that says, assume ScaryException extends Exception, and doesn't put it in the code. I now know, what they meant by that :P