protected virtual void OnRuntimeException(RuntimeExceptionEventArgs e) { if (this.RuntimeException != null) { this.RuntimeException(this, e); } }
private void RuntimeService_RuntimeException(object sender, RuntimeExceptionEventArgs e) { Diagnostics.LogError("The runtime has raised an exception: \"{0}\"\n{1}", new object[] { e.Exception.Message, e.Exception.StackTrace }); Application.Quit(); }