From a07807e6937bf91c3fa267f5c924c4dc2439ff30 Mon Sep 17 00:00:00 2001 From: Kyle Matthew Hedden Date: Wed, 15 Mar 2023 09:04:58 -0400 Subject: [PATCH] code review --- .../LoadHandling/MVMCoreLoadRequestOperation.m | 12 +++++------- MVMCore/MVMCore/Utility/MVMCoreErrorObject.m | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m index 5ff0ea8..72659e2 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m @@ -440,8 +440,6 @@ NSString *messageStyle = [loadObject.responseInfoMap string:KeyMessageStyle]; if (messageStyle && (!loadObject.operation.backgroundLoad || loadObject.requestParameters.allowAlertsIfBackgroundRequest)) { loadObject.operation.alertToShow = YES; - } else { - error.silentError = YES; } } @@ -521,13 +519,13 @@ if (viewController) { // Display or finish - if (error.errorScreenError || !loadObject.requestParameters.dontDisplayViewController) { + if (error.errorScreenError) { error.silentError = NO; - if (error.errorScreenError || error.nativeDrivenErrorScreen) { // Suppress alert errors if there is a full screen error. - loadObject.operation.alertToShow = NO; - loadObject.operation.errorForAlertToShow = nil; + if (error.nativeDrivenErrorScreen) { + [MVMCoreLoggingHandler addErrorToLog:error]; } - [MVMCoreLoggingHandler addErrorToLog:error]; + [MVMCoreLoadRequestOperation displayViewController:viewController loadObject:loadObject error:error]; + } else if (!loadObject.requestParameters.dontDisplayViewController) { [MVMCoreLoadRequestOperation displayViewController:viewController loadObject:loadObject error:error]; } else { [MVMCoreLoggingHandler addErrorToLog:error]; diff --git a/MVMCore/MVMCore/Utility/MVMCoreErrorObject.m b/MVMCore/MVMCore/Utility/MVMCoreErrorObject.m index f6c53bb..9b316dd 100644 --- a/MVMCore/MVMCore/Utility/MVMCoreErrorObject.m +++ b/MVMCore/MVMCore/Utility/MVMCoreErrorObject.m @@ -93,7 +93,7 @@ errorObject = [[MVMCoreErrorObject alloc] initWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorTitle] message:[error localizedDescription] ?: [MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorUnableToProcess] - messageToLog:[error localizedFailureReason] ?: [error localizedDescription] ?: [MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorUnableToProcess] + messageToLog:[error description] code:[error code] domain:ErrorDomainSystem location:location];