Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Why ErrorDialog is not showing exception's stack trace from IStatus?
Why ErrorDialog is not showing exception's stack trace from IStatus? [message #803047] Mon, 20 February 2012 21:33 Go to next message
Libor Jelinek is currently offline Libor JelinekFriend
Messages: 143
Registered: January 2012
Location: Prague, Czech Rep.
Senior Member

Hello everbody!
Consider this example:

try {
  LoginService.authenticate(sysinfo, user);

} catch (LoggingException e) {

  Status status = new Status(IStatus.ERROR, Activator.PLUGIN_ID,  e.getLocalizedMessage(), e);

  ErrorDialog.openError(getShell(), "Error", "Exception occured during authentication!", status);
}


Why JFace ErrorDialog is not showing full stack trace (same like e.printStackTrace()) after pressing "Details >>" button? Actually it is showing just e.getLocalizedMessage() (i.e. just name of exception):

index.php/fa/7220/0/

That's useless. It should contain similar output like e.printStackTrace() to be helpful:

com.virtage.plexflow.system.LoggingException: Authentication failed due to exception
	at com.virtage.plexflow.system.LoginService.authenticate(LoginService.java:44)
	at com.virtage.plexflow.system.LoginDialog.handleOk(LoginDialog.java:333)
	at com.virtage.plexflow.system.LoginDialog.buttonPressed(LoginDialog.java:252)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
Caused by: java.lang.RuntimeException: Failed to build SqlSessionFactory due to exception
	at com.virtage.plexflow.db.PxSqlSessionFactory.<init>(PxSqlSessionFactory.java:76)
	at com.virtage.plexflow.system.SystemInfo.getSqlSessionFactory(SystemInfo.java:84)
	at com.virtage.plexflow.system.LoginService.authenticate(LoginService.java:42)
	... 25 more



Thanks for any ideas!
Re: Why ErrorDialog is not showing exception's stack trace from IStatus? [message #825336 is a reply to message #803047] Tue, 20 March 2012 18:42 Go to previous message
Mauricio Reyes is currently offline Mauricio ReyesFriend
Messages: 26
Registered: August 2011
Junior Member
Hi Libor, I had the same mistake and found the solution you posted in stackoverflow: stackoverflow.com/questions/2826959

Just pin the link so anyone can check it.

Thanks for the post, was very useful to me.
Previous Topic:Common Navigator - over-ride double-click behaviour
Next Topic:segmentation fault indigo SR2 with glassfish 3.1.2 plugin
Goto Forum:
  


Current Time: Tue Apr 23 14:13:36 GMT 2024

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

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

Back to the top