Better logging on bad token in subscription

This commit is contained in:
Evan Prodromou 2010-03-01 14:30:28 -05:00
parent c3ba26bb99
commit 48ce511f94
1 changed files with 4 additions and 1 deletions

View File

@ -185,10 +185,13 @@ class Subscription extends Memcached_DataObject
if ($token->find(true)) {
$result = $token->delete();
if (!$result) {
common_log_db_error($sub, 'DELETE', __FILE__);
common_log_db_error($token, 'DELETE', __FILE__);
throw new Exception(_('Couldn\'t delete subscription OMB token.'));
}
} else {
common_log(LOG_ERR, "Couldn't find credentials with token {$token->tok}");
}
}