• Post Reply Bookmark Topic Watch Topic
  • New Topic

ExceptionListener  RSS feed

 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cindy may be after me for posting a non-beginner question, but if I put it this way, maybe I'll escape!

Does the book have example of using the ExceptionListener? For the first time, I need to throw exceptions from a run method which isn't going to happen so I must use the ExceptionListener interface.

Thanks, and I'll run away now, Cindy!

Betty
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.beans.ExceptionListener interface or not ??

java.beans
Interface ExceptionListener

--------------------------------------------------------------------------------

public interface ExceptionListener
An ExceptionListener is notified of internal exceptions.

 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can read the docs; can anyone provide an example of using the ExceptionListener to throw/catch exceptions within a run method?

I was wondering if Just Java covers the ExceptionListener or where I might find such an example.

Thanks again.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Example to use ExceptionListener.

http://www.cs.rit.edu/~ats/xml-2003-3/html/skript-46.html
 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Specifically, I am using the ExceptionListener with a class that encloses a runnable that throws exceptions. These exceptions cannot propagate out of the runnable so how would I utilize the ExceptionListener to capture and rethrow those exceptions up to the class I want to handle them?
 
Peter van der Linden
author
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Betty,

Thanks for your enquiry. I do not specifically have an example of this in the text.
If it looks like a lot of people need to know about it, I will add an example in the
next edition. What do you think? I think it is probably something that does not
get much use, but am willing to be convinced otherwise.

Cheers!

Peter
 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter,

It is an advanced topic, but that's what makes us more capable. Putting it in the book would be your call depending on how much interest is shown. I think it's one of those things you don't know about until you need it. The topic doesn't seem to be covered elsewhere.

Thanks for a new edition of your book.

Regards,

Betty
[ October 01, 2004: Message edited by: Betty Schwartz ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!