tmf: Log the exception when error occurs while opening a trace
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / project / model / TraceUtils.java
index 23484f460ce9b341ec9eb14befdc01a1c76f7452..59bb7ef1b3a63bf8ec93edfff22448ff9856803c 100644 (file)
@@ -46,11 +46,27 @@ public class TraceUtils {
      *            The error message to display
      */
     public static void displayErrorMsg(final String boxTitle, final String errorMsg) {
+        displayErrorMsg(boxTitle, errorMsg, null);
+    }
+
+    /**
+     * Displays an error message in a box
+     *
+     * @param boxTitle
+     *            The message box title
+     * @param errorMsg
+     *            The error message to display
+     * @param exception
+     *            the exception or null if the error does not originate from an
+     *            exception
+     * @since 2.2
+     */
+    public static void displayErrorMsg(final String boxTitle, final String errorMsg, Throwable exception) {
         Display.getDefault().asyncExec(new Runnable() {
             @Override
             public void run() {
                 final Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
-                Activator.getDefault().logError(errorMsg);
+                Activator.getDefault().logError(errorMsg, exception);
                 MessageDialog.openError(shell, boxTitle, errorMsg);
             }
         });
This page took 0.024579 seconds and 5 git commands to generate.