Merge branch 'charlesmchen/decryptionExceptionLogging'

pull/1/head
Matthew Chen 8 years ago
commit 5dc4938746

@ -710,7 +710,11 @@ NS_ASSUME_NONNULL_BEGIN
- (void)processException:(NSException *)exception envelope:(OWSSignalServiceProtosEnvelope *)envelope - (void)processException:(NSException *)exception envelope:(OWSSignalServiceProtosEnvelope *)envelope
{ {
OWSAssert([NSThread isMainThread]); OWSAssert([NSThread isMainThread]);
DDLogError(@"%@ Got exception: %@ of type: %@", self.tag, exception.description, exception.name); DDLogError(@"%@ Got exception: %@ of type: %@ with reason: %@",
self.tag,
exception.description,
exception.name,
exception.reason);
[self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) { [self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
TSErrorMessage *errorMessage; TSErrorMessage *errorMessage;

@ -55,8 +55,9 @@
[self preKeyRecordForKey:[self keyFromInt:preKeyId] inCollection:TSStorageManagerPreKeyStoreCollection]; [self preKeyRecordForKey:[self keyFromInt:preKeyId] inCollection:TSStorageManagerPreKeyStoreCollection];
if (!preKeyRecord) { if (!preKeyRecord) {
@throw @throw [NSException exceptionWithName:InvalidKeyIdException
[NSException exceptionWithName:InvalidKeyIdException reason:@"No key found matching key id" userInfo:@{}]; reason:@"No pre key found matching key id"
userInfo:@{}];
} else { } else {
return preKeyRecord; return preKeyRecord;
} }

@ -38,8 +38,9 @@ NSString *const TSStorageManagerKeyPrekeyCurrentSignedPrekeyId = @"currentSigned
inCollection:TSStorageManagerSignedPreKeyStoreCollection]; inCollection:TSStorageManagerSignedPreKeyStoreCollection];
if (!preKeyRecord) { if (!preKeyRecord) {
@throw @throw [NSException exceptionWithName:InvalidKeyIdException
[NSException exceptionWithName:InvalidKeyIdException reason:@"No key found matching key id" userInfo:@{}]; reason:@"No signed pre key found matching key id"
userInfo:@{}];
} else { } else {
return preKeyRecord; return preKeyRecord;
} }

Loading…
Cancel
Save