package com.example;

import org.apache.commons.lang3.exception.ExceptionUtils;

import javax.swing.*;
import java.awt.*;

/**
 * @author innokenty
 */
// TODO fix image sizes
public class Dialogs {

    public static void unexpectedError(Exception e, Component parent) {
        JOptionPane.showMessageDialog(
                parent,
                ExceptionUtils.getStackTrace(e),
                e.getMessage(),
                JOptionPane.ERROR_MESSAGE,
                Icon.OOPS.build()
        );
    }

    public static void sorryBro(String message, Component parent) {
        JOptionPane.showMessageDialog(
                parent,
                message,
                "Sorry, bro...",
                JOptionPane.ERROR_MESSAGE,
                Icon.SORRY_BRO.build()
        );
    }
}

@@ -366,17 +366,23 @@
 .get
-StackTrac
+RootCauseMessag
 e(e)
@@ -499,24 +499,53 @@
 %0A        );%0A
+        e.printStackTrace();%0A
     %7D%0A%0A    p

fix - unexpected error dialog - do not show the whole stacktrace, log it instead