mirror of
https://github.com/bitwarden/android.git
synced 2026-05-21 11:56:35 -05:00
launch for main activity and catch exceptions
This commit is contained in:
@@ -24,9 +24,9 @@ using SimpleInjector;
|
||||
namespace Bit.Android
|
||||
{
|
||||
#if DEBUG
|
||||
[Application(Debuggable = true)]
|
||||
//[Application(Debuggable = true)]
|
||||
#else
|
||||
[Application(Debuggable = false)]
|
||||
//[Application(Debuggable = false)]
|
||||
#endif
|
||||
public class MainApplication : Application, Application.IActivityLifecycleCallbacks
|
||||
{
|
||||
@@ -48,22 +48,11 @@ namespace Bit.Android
|
||||
|
||||
private void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e)
|
||||
{
|
||||
var message = AppendExceptionToMessage("", e.Exception);
|
||||
var message = Utilities.AppendExceptionToMessage("", e.Exception);
|
||||
//Utilities.SaveCrashFile(message, true);
|
||||
Utilities.SendCrashEmail(message, false);
|
||||
}
|
||||
|
||||
private string AppendExceptionToMessage(string message, Exception ex)
|
||||
{
|
||||
message += ("\n\n" + ex.Message + "\n\n" + ex.StackTrace);
|
||||
if(ex.InnerException != null)
|
||||
{
|
||||
return AppendExceptionToMessage(message, ex.InnerException);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
public override void OnCreate()
|
||||
{
|
||||
base.OnCreate();
|
||||
|
||||
Reference in New Issue
Block a user