Esempio n. 1
0
        public static void Show(Window owner, string title, Exception e, string additionalInfo)
        {
            var dlg = new ExceptionDialog();

            dlg.Title             = "Error in AlephNote v" + App.APP_VERSION;
            dlg.ErrorMessage.Text = title;
            dlg.ErrorTrace.Text   = (FormatException(e, additionalInfo) ?? FormatStacktrace(additionalInfo));

            SetOwnerSafe(owner, dlg);

            dlg.ShowDialog();
        }
Esempio n. 2
0
        public static void Show(Window owner, string title, string message, Exception e, params Exception[] additionalExceptions)
        {
            string split = Environment.NewLine + "--------------------" + Environment.NewLine;

            var dlg = new ExceptionDialog
            {
                ErrorMessage = { Text = message },
                ErrorTrace   = { Text = string.Join(split, new List <Exception> {
                        e
                    }.Concat(additionalExceptions).Select(ex => FormatException(ex, ""))) },
                Title = title,
            };

            SetOwnerSafe(owner, dlg);

            dlg.ShowDialog();
        }