public static void Show(string caption, Exception e) { // check if running as a service. if (!Environment.UserInteractive) { Utils.Trace(e, "Unexpected error in '{0}'.", caption); return; } new ExceptionDlg().ShowDialog(caption, e); }