public void LogAppError(Aquamonix.Mobile.Lib.Domain.Responses.ErrorResponseBody error) { string title = StringLiterals.GenericErrorAlertTitle; string body = null; if (error != null) { if (!String.IsNullOrEmpty(error.ResponseMessageShort)) { title = error.ResponseMessageShort; } if (!String.IsNullOrEmpty(error.ResponseMessageLong)) { body = error.ResponseMessageLong; } } if (String.IsNullOrEmpty(body)) { if (error != null) { body = String.Format("{0} (ResponseCode:{1}, Process:{2})", StringLiterals.UnknownErrorText, error.ResponseCode, error.Process); } else { body = Domain.StringLiterals.UnknownErrorText; } } this.LogMessage(body, LogSeverity.Error); }
public static void LogAppError(Aquamonix.Mobile.Lib.Domain.Responses.ErrorResponseBody error) { ExceptionUtility.Try(() => { if (Providers.LogUtility != null) { Providers.LogUtility.LogAppError(error); } }); }