Results 1 to 3 of 3
  1. #1
    JvJ
    JvJ is offline Member
    Join Date
    Jul 2013
    Posts
    2
    Rep Power
    0

    Default Have UncaughtExceptionHandler throw an exception?

    I'm trying to set up an uncaught exception handler for a thread, and I'd like to be able to catch an exception in a thread and re-throw the exception in the calling thread. However, it seems that uncaughtException doesn't declare any exceptions that can be thrown. Is there a way around this?

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Have UncaughtExceptionHandler throw an exception?

    So the exception propagates out of the run() method and gets passed to the thread's UncaughtExceptionHandler... and you want to throw it again and catch it where?
    Get in the habit of using standard Java naming conventions!

  3. #3
    JvJ
    JvJ is offline Member
    Join Date
    Jul 2013
    Posts
    2
    Rep Power
    0

    Default Re: Have UncaughtExceptionHandler throw an exception?

    I'll be invoking the thread from a Clojure REPL, and I want the REPL's default exception handler to intercept it. Effectively, I don't want it to be caught by my code.

Similar Threads

  1. Casting a Throw Exception
    By danthegreat in forum New To Java
    Replies: 5
    Last Post: 11-01-2011, 08:43 PM
  2. Throw Exception in this code
    By eng_hyzoom in forum New To Java
    Replies: 9
    Last Post: 12-22-2010, 07:18 PM
  3. what exception to throw
    By DoolinDalton in forum New To Java
    Replies: 5
    Last Post: 02-10-2010, 04:45 PM
  4. throw exception
    By GIRISH PATEL in forum New To Java
    Replies: 4
    Last Post: 04-23-2009, 05:35 AM
  5. throw an exception
    By sfe23 in forum New To Java
    Replies: 3
    Last Post: 02-14-2009, 05:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •