Merge branch 'feature/CXTDT-552152' into 'develop'
CXTDT-552152 ### Summary Potential Fix for Crash in New Relic ### JIRA Ticket https://onejira.verizon.com/browse/CXTDT-552152 Co-authored-by: Danish Phiroz <danish.phiroz@verizon.com> See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core/-/merge_requests/348
This commit is contained in:
commit
31aa1d6df7
@ -686,7 +686,10 @@
|
|||||||
|
|
||||||
if (obj && [obj isKindOfClass:[NSDictionary class]]) {
|
if (obj && [obj isKindOfClass:[NSDictionary class]]) {
|
||||||
NSDictionary *responseInfo = [obj dict:KeyResponseInfo];
|
NSDictionary *responseInfo = [obj dict:KeyResponseInfo];
|
||||||
if (![ValueTypeSuccess isEqualToString:[responseInfo string:KeyType]]) {
|
//Response Info is missing but errorObject should be created with generic message + code + domain
|
||||||
|
if (responseInfo == nil) {
|
||||||
|
errorObject = [[MVMCoreLoadHandler sharedGlobal] errorForLoadObject:loadObject withTitle:nil message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorCritical] code:ErrorCodeJSONNotDictionary domain:ErrorDomainServer];
|
||||||
|
} else if (![ValueTypeSuccess isEqualToString:[responseInfo string:KeyType]]) {
|
||||||
errorObject = [[MVMCoreLoadHandler sharedGlobal] attachLoadInformation:loadObject toError:
|
errorObject = [[MVMCoreLoadHandler sharedGlobal] attachLoadInformation:loadObject toError:
|
||||||
[[MVMCoreErrorObject alloc]
|
[[MVMCoreErrorObject alloc]
|
||||||
initWithTitle:[responseInfo stringForKey:KeyErrorHeading]
|
initWithTitle:[responseInfo stringForKey:KeyErrorHeading]
|
||||||
@ -696,7 +699,6 @@
|
|||||||
domain:ErrorDomainServer
|
domain:ErrorDomainServer
|
||||||
location:[[MVMCoreLoadHandler sharedGlobal] errorLocationForRequest:loadObject]]];
|
location:[[MVMCoreLoadHandler sharedGlobal] errorLocationForRequest:loadObject]]];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Caches each dictionary from the array.
|
// Caches each dictionary from the array.
|
||||||
[[MVMCoreCache sharedCache] addModuleToCache:obj module:key queue:nil waitUntilFinished:YES completionBlock:NULL];
|
[[MVMCoreCache sharedCache] addModuleToCache:obj module:key queue:nil waitUntilFinished:YES completionBlock:NULL];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -23,8 +23,10 @@
|
|||||||
// Initialization code
|
// Initialization code
|
||||||
self.title = title;
|
self.title = title;
|
||||||
self.messageToDisplay = message;
|
self.messageToDisplay = message;
|
||||||
|
self.messageToLog = message;
|
||||||
self.code = code;
|
self.code = code;
|
||||||
self.domain = domain;
|
self.domain = domain;
|
||||||
|
self.systemDomain = nil;
|
||||||
self.location = location;
|
self.location = location;
|
||||||
self.date = [NSDate date];
|
self.date = [NSDate date];
|
||||||
self.silentError = YES;
|
self.silentError = YES;
|
||||||
@ -32,6 +34,11 @@
|
|||||||
[MVMCoreDispatchUtility performSyncBlockOnMainThread:^{
|
[MVMCoreDispatchUtility performSyncBlockOnMainThread:^{
|
||||||
self.applicationState = [UIApplication sharedApplication].applicationState;
|
self.applicationState = [UIApplication sharedApplication].applicationState;
|
||||||
}];
|
}];
|
||||||
|
self.sessionId = nil;
|
||||||
|
self.requestId = nil;
|
||||||
|
self.requestUrl = nil;
|
||||||
|
self.serverResponseInfo = nil;
|
||||||
|
self.crashLog = nil;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@ -41,9 +48,11 @@
|
|||||||
if (self = [super init]) {
|
if (self = [super init]) {
|
||||||
// Initialization code
|
// Initialization code
|
||||||
self.title = title;
|
self.title = title;
|
||||||
|
self.messageToDisplay = nil;
|
||||||
self.messageToLog = messageToLog;
|
self.messageToLog = messageToLog;
|
||||||
self.code = code;
|
self.code = code;
|
||||||
self.domain = domain;
|
self.domain = domain;
|
||||||
|
self.systemDomain = nil;
|
||||||
self.location = location;
|
self.location = location;
|
||||||
self.date = [NSDate date];
|
self.date = [NSDate date];
|
||||||
self.silentError = YES;
|
self.silentError = YES;
|
||||||
@ -51,6 +60,11 @@
|
|||||||
[MVMCoreDispatchUtility performSyncBlockOnMainThread:^{
|
[MVMCoreDispatchUtility performSyncBlockOnMainThread:^{
|
||||||
self.applicationState = [UIApplication sharedApplication].applicationState;
|
self.applicationState = [UIApplication sharedApplication].applicationState;
|
||||||
}];
|
}];
|
||||||
|
self.sessionId = nil;
|
||||||
|
self.requestId = nil;
|
||||||
|
self.requestUrl = nil;
|
||||||
|
self.serverResponseInfo = nil;
|
||||||
|
self.crashLog = nil;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user