hide NullPointerException  
Author Message
jobs239





PostPosted: 2003-9-24 2:40:00 Top

java-programmer, hide NullPointerException I have a GUI which throws a nullpointerexception when things go wrong.
Then it closes. That nullpointerexception is expected and I want it
ignored since before that it has already informed the user that
something has gone wrong and its closing. How can I do this? If I just
put the part of the function throwing the exception within try/catch,
it tends to hang. If I leave it as is, it throws the exception but
closes fine. I just don't want the user to see that exception.
 
Stewart Gordon





PostPosted: 2003-9-26 22:34:00 Top

java-programmer >> hide NullPointerException While it was 23/9/03 7:40 pm throughout the UK, kaith sprinkled little
black dots on a white screen, and they fell thus:
> I have a GUI which throws a nullpointerexception when things go wrong.
> Then it closes. That nullpointerexception is expected and I want it
> ignored since before that it has already informed the user that
> something has gone wrong and its closing. How can I do this? If I just
> put the part of the function throwing the exception within try/catch,
> it tends to hang. If I leave it as is, it throws the exception but
> closes fine. I just don't want the user to see that exception.

There's obviously a bug in your code. What are you actually doing in
the code that throws the exception?

A code sample just sufficient to show the problem would be helpful.

Stewart.

--
My e-mail is valid but not my primary mailbox. Please keep replies on
on the 'group where everyone may benefit.