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
{
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) {
TSErrorMessage *errorMessage;

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

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

Loading…
Cancel
Save