Bug 62683 - No error text shown in dialog when invalid jmx file gets opened
Summary: No error text shown in dialog when invalid jmx file gets opened
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 4.0
Hardware: All All
: P2 minor (vote)
Target Milestone: JMETER_5.0
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-05 19:45 UTC by Felix Schumacher
Modified: 2018-09-07 15:38 UTC (History)
0 users



Attachments
Use the inner exception of a StreamException to display some error text at least (1.57 KB, patch)
2018-09-05 19:45 UTC, Felix Schumacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Schumacher 2018-09-05 19:45:35 UTC
Created attachment 36133 [details]
Use the inner exception of a StreamException to display some error text at least

When a user tries to open an invalid jmx file (for example a jmeter.log file), the shown error dialog contains no text.

This happens as the getMessage method of the caught exception gets displayed, but the StreamException has no descriptive message.

The attached patch will use the inner exception for the error message as that is (in my tests) not empty and rather descriptive.

In addition to this change I think the error dialog should be changed to show a general error message (instead of simply displaying "Error") together with the name of the file that was tried to be opened.
Comment 1 UbikLoadPack support 2018-09-05 19:56:10 UTC
LGTM.
Thanks
Comment 2 Felix Schumacher 2018-09-06 17:08:59 UTC
Date: Thu Sep  6 17:07:59 2018
New Revision: 1840238

URL: http://svn.apache.org/viewvc?rev=1840238&view=rev
Log:
Use the wrapped exception for error message on file load for StreamException

When a user opens a test plan that is no xml at all, a StreamException
gets thrown. This exception can have an empty message. That will lead
to an error dialog that has no text at all. In that case we try to work
around this by using the wrapped exception as the source for the error
message.

Bugzilla Id: 62683

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/Load.java
    jmeter/trunk/xdocs/changes.xml