Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 546657

Summary: DOT UI - Error Handling/Logging improvements
Product: [Tools] GEF Reporter: Tamas Miklossy <miklossy>
Component: GEF DOTAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 5.1.0 (2019-06)   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Tamas Miklossy CLA 2019-04-23 07:39:58 EDT
Currently, there are several places in the DOT UI code base where an exception is caught in a catch block and the exception handling is a pure e.printStackTrace() call.

This considered as bad practice, see also the SonarQube rule 'Throwable.printStackTrace(...) should not be called'
https://rules.sonarsource.com/java/RSPEC-1148

To adresse this issue, a logger integrated into the Eclipse Error Log View should be used in such cases to provide possiblities to the user to access the exception stack trace.
Comment 1 Tamas Miklossy CLA 2019-04-23 07:44:55 EDT
I pushed the following changes to the master branch:

[546657] DOT UI - Error Handling/Logging improvements.

- Extend the DotActivatorEx with the public static void
logError(Exception) method to provide the possibility to log into the
Eclipse Error Log.
- Modify the DOT UI code base to use that log method instead of a pure
e.printStackTrace() call.

Resolving as fixed in 5.1.0 (2019-06).