The Sun tutorials show you one way to perform an output upon a thrown exception. There's also another way( as stated in the API for IllegalArgumentException - yes, exceptions have an API page too  ) which is not much different from your existing code:
...
throw new IllegalArgumentException("Exception: cannot execute.");
...
Pretty easy, right? 
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. to our beloved Java Forums! (closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. !
Got a little Capt'n in you? (drink responsibly)
|