JMC-5372: Exception printed on page when opening invalid recording
marcus.hirt at oracle.com
Wed Nov 14 00:59:57 UTC 2018
Personally I am a bit allergic to modal dialogs. For example, if we have
multiple recordings ending with problems, I'd rather have the editors opening
with details than one or more modal dialogs. That is, of course, a personal
preference that I'd be happy to discuss here. That said, I think what is shown,
and how it is shown, in the editor could be improved. For example we should
show the error title and message (that would have been showed in the modal
dialog) first, followed by the stack trace. Possibly not throwing the
stack trace in the user's face until it is asked for.
Please let me know what you think!
On 2018-11-13, 21:45, "jmc-dev on behalf of Alex Macdonald" <jmc-dev-bounces at openjdk.java.net on behalf of almacdon at redhat.com> wrote:
This short patch addresses JMC-5372 , in which the error dialog is not
displayed when an exception is thrown in the JFR Editor.
As far as I can tell, the error here is within the catch block of the
"displayPage" function in the JFR Editor . When an exception is caught
there is an evaluation of the boolean property for "showModalErrorDialog"
, however I cannot find the instance where this property would be
toggled from false to true. As a result, the if-statement takes the branch
that displays the error page, but not the error dialog. The proposed fix
here removes the check for the boolean (because we have already caught the
exception), and instead opt to display both the error page and the modal.
I've included a couple of images to show the result of this patch , as
well as gifs showing the before  & after  experience.
Before (gif): https://imgur.com/hHRmkx3 
After (gif): https://imgur.com/8rtaysS 
After (img): https://imgur.com/0oBi6nH 
More information about the jmc-dev