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):
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!