RFR: JMC-5372: Exception printed on page when opening invalid recording

Alex Macdonald almacdon at redhat.com
Tue Nov 13 20:43:34 UTC 2018


This short patch addresses JMC-5372 [0], 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 [1]. When an exception is caught
there is an evaluation of the boolean property for "showModalErrorDialog"
[2], 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 [3], as
well as gifs showing the before [4] & after [5] experience.
Before (gif): https://imgur.com/hHRmkx3 [3]
After (gif): https://imgur.com/8rtaysS [4]
After (img): https://imgur.com/0oBi6nH [5]




[0] https://bugs.openjdk.java.net/browse/JMC-5372
[3] https://imgur.com/hHRmkx3
[4] https://imgur.com/8rtaysS
[5] https://imgur.com/0oBi6nH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5372-0.patch
Type: text/x-patch
Size: 1437 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/jmc-dev/attachments/20181113/fc61ad82/5372-0.patch>

More information about the jmc-dev mailing list