[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 781
  • Last Modified:

How to catch java.lang.InternalError

If possible, I'd like to catch java.lang.InternalError (and it's cousins). The following error is produced when the Unix DISPLAY variable is set incorrectly:

java.lang.InternalError: Can't connect to X11 server......
followed by a stacktrack.

Better if my application could report something cleaner to the user.

Any ideas on how to catch this???  catch(Exception) doesn't seem
to work.

-A
0
adamww
Asked:
adamww
1 Solution
 
adamwwAuthor Commented:
Edited text of question.
0
 
mwibbelsCommented:
try {

}
catch (Throwable e) {
   // do something nice
}

Will catch any type of Exception or Error
0
 
heyhey_Commented:
this Exception is probably thrown in some system Thread ... and you can't catch it at all.

please post the full exception stacktrace.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now