Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Avoid stacktrace in ErrorLog-Details Window
icon5.gif  Avoid stacktrace in ErrorLog-Details Window [message #1738261] Mon, 18 July 2016 14:01 Go to next message
Alexander Fichtinger is currently offline Alexander FichtingerFriend
Messages: 62
Registered: January 2013
Member
Hey guys,

======================================
we have the following scenario:

We are running an Eclipse Job.

An exception is thrown, when an error occurs in this job. Next, this exception is passed to the constructor of the Status class.

This is how we create the Status:
new Status(IStatus.ERROR, bundleName, exception.getMessage(), exception.getCause())

======================================
Now to the problem:
Apparently the Eclipse framework proccesses this Status of a Job and shows an entry in the Error Log view.

If a double-click is performed on such a log entry, the section "Exception Stack Trace" shows the stack trace for the exception.
This is a nice feature, unfortunately we don't want the user to see these "technical" details.

Is there a way to avoid that the stack trace is shown and instead a proper message for the user is displayed?


Any help would be appreciated!

Kind regards =)








Re: Avoid stacktrace in ErrorLog-Details Window [message #1738277 is a reply to message #1738261] Mon, 18 July 2016 15:19 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3250
Registered: July 2009
Senior Member

The constructor you're calling is Status(int severity, String pluginId, int code, String message, Throwable exception) , so why not use the "message" argument as a *message* rather than needlessly breaking the original exception apart?

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Avoid stacktrace in ErrorLog-Details Window [message #1738375 is a reply to message #1738277] Tue, 19 July 2016 10:34 Go to previous message
Alexander Fichtinger is currently offline Alexander FichtingerFriend
Messages: 62
Registered: January 2013
Member
Thanks for your fast reply! =)

We already stumbled upon this constructor and tried various variants, so that the dialog meets our needs.

However, how would the following be possible:

- the dialog which appears in case of an error (Job fails) shows additional information when pressing the "Details" button
BUT
- we do not want to see the stacktrace in the "Exception Stack Trace" text area when double clicking the error log entry

Is this a possible use-case?

Thanks for your help! =)

Regards
Previous Topic:Problem with Eclipse Preferences
Next Topic:How to update org.eclipse.help.base and help.webapp plugins
Goto Forum:
  


Current Time: Wed Sep 19 09:28:00 GMT 2018

Powered by FUDForum. Page generated in 0.37663 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top