Skip to content

Commit

Permalink
added general warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinoAvonEFSA committed Jan 11, 2018
1 parent 019b0fe commit a85d9b3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/tse_config/GeneralWarnings.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

Expand Down

0 comments on commit a85d9b3

Please sign in to comment.