From 611aec273467a37858111f122ec5f2cfd3e04056 Mon Sep 17 00:00:00 2001 From: ValentinoAvonEFSA Date: Thu, 11 Jan 2018 15:15:09 +0100 Subject: [PATCH] added general warning --- src/global_utils/Warnings.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/global_utils/Warnings.java b/src/global_utils/Warnings.java index 37b324a..4b4fdf6 100644 --- a/src/global_utils/Warnings.java +++ b/src/global_utils/Warnings.java @@ -7,6 +7,7 @@ import ack.DcfAckLog; import ack.OpResError; import app_config.PropertiesReader; +import exception_manager.ExceptionConverter; import i18n_messages.Messages; import soap.MySOAPException; import soap.SOAPError; @@ -36,16 +37,7 @@ public static int warnUser(Shell shell, String title, String message) { } public static String getStackTrace(Exception e) { - - String message = e.getMessage(); - - StringBuilder sb = new StringBuilder(); - for (StackTraceElement ste : e.getStackTrace()) { - sb.append("\n\tat "); - sb.append(ste); - } - String trace = message + " " + sb.toString(); - + String trace = ExceptionConverter.getStackTrace(e); return trace; }