static void ExceptionHandler(object sender, UnhandledExceptionEventArgs args) { Exception e = (Exception)args.ExceptionObject; //Console.WriteLine("ExceptionHandler caught : " + e.Message); VmMain.ShowMessage("Unexpected Exception: " + e.Message); Toolbox.ShowWarning("Unexpected Exception: " + e.Message); }