package de.duehl.swing.ui.error;

import javax.swing.SwingUtilities;

import de.duehl.swing.ui.GuiTools;

public class GuiExceptionHandlerNoErrorDialogTest2 {

    private static final String MESSAGE = "Abbruch durch den Benutzer!";

    public static void main(String[] args) {
        GuiTools.setNiceLayoutManager();

        GuiExceptionHandlerRegistration registration = new GuiExceptionHandlerRegistration();
        registration.addNoDialogErrorMessage(MESSAGE);
        registration.registerToEdt();

        SwingUtilities.invokeLater(() ->
            {
                throw new IllegalArgumentException(MESSAGE);
            }
            );
    }

}
