我用MonoDevelop开始了新的Gtk#解决方案。现在,我可以将全局异常处理程序弹出一个对话框,向用户显示堆栈跟踪等?是否有任何现有的库可以做到这一点?
像https://exceptionreporter.codeplex.com/
这样的东西Main.cs:
using System;
using Gtk;
namespace foobar
{
class MainClass
{
public static void Main (string[] args)
{
Application.Init ();
MainWindow win = new MainWindow ();
win.Show ();
Application.Run ();
}
}
}
MainWindow.cs:
using System;
using Gtk;
public partial class MainWindow: Gtk.Window
{
public MainWindow (): base (Gtk.WindowType.Toplevel)
{
Build ();
}
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
Application.Quit ();
a.RetVal = true;
}
}