diff --git a/src/tse_config/GeneralWarnings.java b/src/tse_config/GeneralWarnings.java index 0cedded..232ed6b 100644 --- a/src/tse_config/GeneralWarnings.java +++ b/src/tse_config/GeneralWarnings.java @@ -5,6 +5,7 @@ import org.eclipse.swt.widgets.Shell; import app_config.PropertiesReader; +import exception_manager.ExceptionConverter; import i18n_messages.TSEMessages; import message.SendMessageErrorType; import message.SendMessageException; @@ -16,15 +17,10 @@ public class GeneralWarnings { public static void showExceptionStack(Shell shell, Exception e) { - StringBuilder sb = new StringBuilder(); - for (StackTraceElement ste : e.getStackTrace()) { - sb.append("\n\tat "); - sb.append(ste); - } - String trace = sb.toString(); + String trace = ExceptionConverter.getStackTrace(e); - - JOptionPane.showMessageDialog(null, TSEMessages.get("generic.error", PropertiesReader.getSupportEmail(), trace), + JOptionPane.showMessageDialog(null, TSEMessages.get("generic.error", + PropertiesReader.getSupportEmail(), trace), TSEMessages.get("error.title"), JOptionPane.ERROR_MESSAGE); }