void MyApp_UnhandledExceptionHandler(object sender, RaiseThrowableEventArgs e) { // Send the Exception to TestFlight. TestFlight.SendCrash(e.Exception); throw e.Exception; }
private void AndroidEnvironmentUnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { if (e.Exception != null) { e.Handled = this.HandleException(e.Exception); } }
public void OnUnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { Exception managedException = (Exception)e.Exception; if (managedException != null) { CrossTelemetryManager.Current.TrackManagedException (managedException, false); } }
private static void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { if (CurrentActivity != null) { DroidUtility.ReportException(CurrentActivity, e.Exception, true); e.Handled = true; } }
private static void AndroidEnvironmentOnUnhandledExceptionRaiser(RaiseThrowableEventArgs eventArgs, bool callJavaDefaultUncaughtExceptionHandler) { JavaException exception = MonoException.Create(eventArgs.Exception); if (callJavaDefaultUncaughtExceptionHandler && Thread.DefaultUncaughtExceptionHandler != null) Thread.DefaultUncaughtExceptionHandler.UncaughtException(Thread.CurrentThread(), exception); else Crashlytics.LogException(exception); }
/// <summary> /// 处理未处理异常 /// </summary> /// <param name="e"></param> private void UnhandledExceptionHandler(Exception ex, RaiseThrowableEventArgs e) { //处理程序(记录 异常、设备信息、时间等重要信息) //************** Core.SysVisitor.Log("yichang", e.Exception.Message); //提示 Task.Run(() => { Looper.Prepare(); //可以换成更友好的提示 Toast.MakeText(this, "很抱歉,程序出现异常,即将退出.", ToastLength.Long).Show(); Looper.Loop(); }); //停一会,让前面的操作做完 System.Threading.Thread.Sleep(2000); e.Handled = true; }
internal static void UnhandledException(Exception e) { Logger.Log (LogLevel.Info, "MonoDroid", "UNHANDLED EXCEPTION:"); Logger.Log (LogLevel.Info, "MonoDroid", e.ToString ()); var info = new RaiseThrowableEventArgs (e); bool handled = false; foreach (EventHandler<RaiseThrowableEventArgs> handler in GetUnhandledExceptionRaiserInvocationList ()) { handler (null, info); if (info.Handled) { handled = true; break; } } if (!handled) RaiseThrowable (Java.Lang.Throwable.FromException (e)); }
internal static void UnhandledException(Exception e) { var raisers = UnhandledExceptionRaiser; if (raisers != null) { var info = new RaiseThrowableEventArgs(e); foreach (EventHandler <RaiseThrowableEventArgs> handler in raisers.GetInvocationList()) { handler(null, info); if (info.Handled) { return; } } } RaiseThrowable(Java.Lang.Throwable.FromException(e)); }
/// <summary> /// 处理未处理异常 /// </summary> /// <param name="e"></param> private void UnhandledExceptionHandler(Exception ex, RaiseThrowableEventArgs e) { //处理程序(记录 异常、设备信息、时间等重要信息) //************** string ls_ErrorMsg = "捕获引发当前异常的方法:" + ex.TargetSite + "\n"; ls_ErrorMsg += "捕获当前异常发生所经历的方法的名称和签名:" + ex.StackTrace + "\n"; ls_ErrorMsg += "捕获或设置导致错误的应用程序或对象的名称:" + ex.Source + "\n"; ls_ErrorMsg += "异常详情:" + ex.Message + "\n"; ls_ErrorMsg += "异常时间:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"); ls_ErrorMsg = System.Web.HttpUtility.HtmlEncode(ls_ErrorMsg); Core.SysVisitor.Log("CatchGlobalException ", ls_ErrorMsg); Core.Tools.SubmitError("全局捕获异常\n" + ls_ErrorMsg); //提示 Task.Run(() => { Looper.Prepare(); //可以换成更友好的提示 Toast.MakeText(this, "很抱歉,程序出现异常,即将退出.异常情况已上报给开发人员", ToastLength.Long).Show(); Toast.MakeText(this, "很抱歉,程序出现异常,即将退出.异常情况已上报给开发人员", ToastLength.Long).Show(); //AlertDialog.Builder builder = new AlertDialog.Builder(this); //builder.SetTitle("很抱歉,程序出现异常,即将退出.\n请输入你的联系方式已将错误上报给开发人员处理"); //var et_text = new EditText(this); //builder.SetView(et_text); //builder.SetPositiveButton("确定", delegate //{ // if (et_text.Text != "") // { // Core.Tools.SubmitError(e.Exception.Message, et_text.Text); // } // else // { // Core.Tools.SubmitError("全局捕获异常\n" + ls_ErrorMsg); // } //}); //builder.SetCancelable(false); //builder.Show(); Looper.Loop(); }); //停一会,让前面的操作做完 System.Threading.Thread.Sleep(4000); e.Handled = true; Core.SysVisitor.EXIT(this); }
internal static void UnhandledException(Exception e) { var info = new RaiseThrowableEventArgs(e); bool handled = false; foreach (EventHandler <RaiseThrowableEventArgs> handler in GetUnhandledExceptionRaiserInvocationList()) { handler(null, info); if (info.Handled) { handled = true; break; } } if (!handled) { RaiseThrowable(Java.Lang.Throwable.FromException(e)); } }
internal static void UnhandledException(Exception e) { Logger.Log(LogLevel.Info, "MonoDroid", "UNHANDLED EXCEPTION:"); Logger.Log(LogLevel.Info, "MonoDroid", e.ToString()); var info = new RaiseThrowableEventArgs(e); bool handled = false; foreach (EventHandler <RaiseThrowableEventArgs> handler in GetUnhandledExceptionRaiserInvocationList()) { handler(null, info); if (info.Handled) { handled = true; break; } } if (!handled) { RaiseThrowable(Java.Lang.Throwable.FromException(e)); } }
void AndroidUnhandledExceptionHandler(object sender, RaiseThrowableEventArgs e) { // When the UI Thread crashes this is the code that will be executed. There is no context at this point // and no way to recover from the exception. This is where you would capture the error and log it to a // file for example. You might be able to post to a web handler, I have not tried that. // // You can access the information about the exception in the args.Exception object. // Send the Exception to HockeyApp HockeyApp.ManagedExceptionHandler.SaveException (e.Exception); }
private void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { var newExc = new Exception("AndroidEnvironmentUnhandledExceptionRaiser", e.Exception as Exception); LogUnhandledException(newExc); }
private static void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { if (e.Exception != null) { _client.Send(e.Exception); } }
public void OnUnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { Exception managedException = (Exception)e.Exception; if (managedException != null) { AI.XamarinSDK.Abstractions.TelemetryManager.TrackManagedException (managedException, false); } }
private void OnUnhandledExceptionRaised(object sender, RaiseThrowableEventArgs args) { TraceWriter.WriteTrace(args.Exception); args.Handled = true; }
private static void OnException(object sender, RaiseThrowableEventArgs e) { Ubertesters.SendException(e); throw e.Exception; }
void HandleUnhandledException (object sender, RaiseThrowableEventArgs e) { TestFlight.TestFlight.SendCrash (e.Exception); }
void HandleAndroidException(object sender, RaiseThrowableEventArgs e) { if (e.Exception.GetType() == typeof (System.Net.WebException)) { ExceptionHelper.NoConnection(); e.Handled = true; } }
void MyApp_UnhandledExceptionHandler(object sender, RaiseThrowableEventArgs e) { Dictionary<string,string> info = new Dictionary<string, string> (); info.Add ("Type", "UnHandledException"); DebugReport.Report (e.Exception,info); }
void HandleAndroidException(object sender, RaiseThrowableEventArgs e) { e.Handled = true; Console.Write ("HANDLED EXCEPTION:"+e.Exception.Message); }
private void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { LogHelper.Error(e.Exception); }
void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { //线程取消异常, 不好捕捉,在这里可以处理掉. //System.Threading.Tasks.TaskCanceledException: A task was canceled. e.Handled = true; }
void MyApp_UnhandledExceptionHandler(object sender, RaiseThrowableEventArgs e) { Console.WriteLine (e); Console.WriteLine (e.Exception.ToString ()); }
static void HandleUnhandledExceptionRaiser (object sender, RaiseThrowableEventArgs e) { Mint.XamarinException (e.Exception.ToJavaException (), false, null); LastBreath (); OnUnhandledExceptionHandled (e.Exception, "System.Exception"); }
private void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { string tag = "TranslateHelper"; Log.Error(tag, e.Exception.Message); }
void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { UnhandledExceptionHandler(e.Exception, e); }
private static void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { if (e.Exception != null) { _client.Send(e.Exception, new List<string>() { "UnhandledException" }); Pulse.SendRemainingActivity(); } }
void MyApp_UnhandledExceptionHandler(object sender, Android.Runtime.RaiseThrowableEventArgs e) { string ex = e.Exception.Message; e.Handled = true; }
private void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { }
public static void HandleExceptions (object sender, RaiseThrowableEventArgs e) { Console.WriteLine ("Exception caught:\n" + e.Exception); // e.Handled = true; }
private void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { if (e.Exception != null) { LogException("AndroidEnvironment", e.Exception); } }
void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { Toast.MakeText (this, e.Exception.Message, ToastLength.Long).Show (); StartActivity (typeof(MainActivity)); Finish (); }
private void AndroidEnvironmentUnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e) { // Place a breakpoint in this method to inspect e.Exception }