Improve error reporting: Extract original message when showing "Java exception messages" consistently. Improve error handling in deprecated OneDrive API stub and avoid crash by no-longer throwing in Main-thread methods.

This commit is contained in:
Philipp Crocoll
2025-04-15 11:45:16 +02:00
parent 8e256ac94d
commit dbf10ba9fb
30 changed files with 135 additions and 85 deletions

View File

@@ -310,7 +310,7 @@ namespace keepass2android
catch (Exception e)
{
Kp2aLog.Log(e.ToString());
App.Kp2a.ShowMessage(this, "Error: " + e.Message, MessageSeverity.Error);
App.Kp2a.ShowMessage(this, "Error: " + Util.GetErrorMessage(e), MessageSeverity.Error);
return;
}
@@ -1485,7 +1485,7 @@ namespace keepass2android
catch (Exception e)
{
Kp2aLog.LogUnexpectedError(e);
errorMessage = e.Message;
errorMessage = Util.GetErrorMessage(e);
return false;
}
}
@@ -2273,7 +2273,7 @@ namespace keepass2android
{
Kp2aLog.LogUnexpectedError(e);
ShowError( _act.GetString(Resource.String.ErrorUpdatingOtpAuxFile) + " " + e.Message);
ShowError( _act.GetString(Resource.String.ErrorUpdatingOtpAuxFile) + " " + Util.GetErrorMessage(e));
}