Bug 62683

Summary: No error text shown in dialog when invalid jmx file gets opened
Product: JMeter Reporter: Felix Schumacher <felix.schumacher>
Component: MainAssignee: JMeter issues mailing list <issues>
Severity: minor    
Priority: P2    
Version: 4.0   
Target Milestone: JMETER_5.0   
Hardware: All   
OS: All   
Attachments: Use the inner exception of a StreamException to display some error text at least

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
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
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

Bugzilla Id: 62683