r110354 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110353‎ | r110354 | r110355 >
Date:01:51, 31 January 2012
Author:aaron
Status:ok
Tags:
Comment:
Made wmfGetSwiftThumbContainer() catch/log connection exceptions for good measure
Modified paths:
  • /trunk/extensions/SwiftMedia/wmf/swift.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SwiftMedia/wmf/swift.php
@@ -62,8 +62,14 @@
6363 NULL,
6464 $wmfSwiftConfig['authUrl']
6565 );
66 - $auth->authenticate();
6766
 67+ try {
 68+ $auth->authenticate();
 69+ } catch ( Exception $e ) {
 70+ wfDebugLog( 'swiftThumb', "Could not establish a connection to Swift." );
 71+ return null;
 72+ }
 73+
6874 $conn = new CF_Connection( $auth );
6975
7076 $wikiId = "{$site}-{$lang}";

Status & tagging log