Don't fatal if a notification fails to initialize

Log info to Echo debug log group instead.

Bug: 71489
Change-Id: I4a7c669ef55936e3c683d268041d828b54a5a9b2
This commit is contained in:
Erik Bernhardson 2014-09-30 15:52:06 -07:00 committed by Spage
parent e0cf3b23cb
commit 0cfe5ca269

View file

@ -171,7 +171,13 @@ class EchoNotificationMapper extends EchoAbstractMapper {
if ( $res ) {
foreach ( $res as $row ) {
$data[$row->event_id] = EchoNotification::newFromRow( $row );
try {
$data[$row->event_id] = EchoNotification::newFromRow( $row );
} catch ( Exception $e ) {
$id = isset( $row->event_id ) ? $row->event_id : 'unknown event';
wfDebugLog( 'Echo', __METHOD__ . ": Failed initializing event: $id" );
MWExceptionHandler::logException( $e );
}
}
}
return $data;