Exception in main method --> dialog
If my main() method throws an exception, then a dialog comes up, with title "Java Virtual Machine Launcher", and message "Fatal exception occurred. Program will exit.".
I reckon this is brought up by javaw (Sun documentation says "The javaw launcher will, however, display a dialog box with error information if a launch fails for some reason.").
Does anyone know if it is possible to avoid this? As I say, I reckon this is more a javaw issue, but it affects usage of IDEA.
Please sign in to leave a comment.
Hi,
Why not to catch the exception, print stack trace / log it, and the
gracefully exit?
Calum MacLean wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
That's what I've done in this case.
However, I don't generally want to have to catch runtime exceptions in my main() method, so I still think it would be useful if the dialog didn't appear if an exception is thrown out of the main method.
I'm afraid we have no control over this dialog, since we do not use our
launcher with javaw.
"Calum MacLean" <no_mail@jetbrains.com> wrote in message
news:20520791.1082726704432.JavaMail.itn@is.intellij.net...
title "Java Virtual Machine Launcher", and message "Fatal exception
occurred. Program will exit.".
>
launcher will, however, display a dialog box with error information if a
launch fails for some reason.").
>
is more a javaw issue, but it affects usage of IDEA.
Fixed in #2014
--
Dmitry Peshehonov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Calum MacLean" <no_mail@jetbrains.com> wrote in message
news:20520791.1082726704432.JavaMail.itn@is.intellij.net...
title "Java Virtual Machine Launcher", and message "Fatal exception
occurred. Program will exit.".
>
launcher will, however, display a dialog box with error information if a
launch fails for some reason.").
>
is more a javaw issue, but it affects usage of IDEA.