Results 1 to 3 of 3
  1. #1
    shinobu is offline Member
    Join Date
    Apr 2009
    Posts
    3
    Rep Power
    0

    Default [SOLVED] SWT Custom Exception handling

    Hi Everyone,

    I am struggling to find any information on how to handle Exceptions in SWT in a consistent manner.

    What I mean is I want to be able to handle any SWTErrors and SWTExceptions in a consistent manner so that I may either show the errors to the user or log them or whatever. I am worried that some exceptions maybe raised and they are swallowed or unnoticed.

    I believe this can be done in Eclipse RCP application by modifying the exception handler class (I haven't done this myself).

    I have had a look at this article and it suggests that I should consider all the SWT calls I make - but this does not seem practical and likely that I will overlook some call:

    The Java developer's guide to Eclipse By Jim D'Anjou (page 358)
    (Accessible by googl'ing: "exception handling in SWT" - look at the 4th result)

    I am hoping that there are some resources or standard best practices for this kind of thing (haven't been able to find anything via Google - I also googled this Forum for past posts)

    Maybe I just have to do as suggested in the article above?

    Please let me know if I am unclear in any way.

    Thanks in advance,
    Ved

  2. #2
    shinobu is offline Member
    Join Date
    Apr 2009
    Posts
    3
    Rep Power
    0

    Default

    Sorry I should clarify - my question relates to all Unchecked exceptions (either raised by SWT or raised by other operations called by SWT code that I've written) .

    Also It's the 3rd result returned from Google not the 4th.



    Sorry I failed to carefully proof read my earlier post.

  3. #3
    shinobu is offline Member
    Join Date
    Apr 2009
    Posts
    3
    Rep Power
    0

    Default Resource found

    I found what I was after - something more general to Exception handling in Java.

    Please google
    Taming Tiger: Default exception handling in threads
    For the first result. This was the article I read.

    I then implemented this for SWT.

    Hope this helps someone

Similar Threads

  1. Exception handling and logging
    By jurka in forum New To Java
    Replies: 8
    Last Post: 09-03-2008, 07:07 PM
  2. Exception Handling...
    By focus_nitin in forum New To Java
    Replies: 1
    Last Post: 02-16-2008, 03:13 AM
  3. JDBC - Exception handling
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-05-2007, 04:00 PM
  4. Jstl Exception Handling
    By vamsidharpoosarla in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 07-18-2007, 06:17 AM
  5. JSTL Exception Handling
    By chaatf in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 07-18-2007, 02:24 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
  •