r108748 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108747‎ | r108748 | r108749 >
Date:19:54, 12 January 2012
Author:aaron
Status:deferred
Tags:
Comment:
Added backend name to 'backend-fail-connect' messages
Modified paths:
  • /branches/FileBackend/phase3/includes/filerepo/backend/SwiftFileBackend.php (modified) (history)

Diff [purge]

Index: branches/FileBackend/phase3/includes/filerepo/backend/SwiftFileBackend.php
@@ -81,7 +81,7 @@
8282 // (a) Get a swift proxy connection
8383 $conn = $this->getConnection();
8484 if ( !$conn ) {
85 - $status->fatal( 'backend-fail-connect' );
 85+ $status->fatal( 'backend-fail-connect', $this->name );
8686 return $status;
8787 }
8888
@@ -92,7 +92,7 @@
9393 $status->fatal( 'backend-fail-create', $params['dst'] );
9494 return $status;
9595 } catch ( InvalidResponseException $e ) {
96 - $status->fatal( 'backend-fail-connect' );
 96+ $status->fatal( 'backend-fail-connect', $this->name );
9797 return $status;
9898 } catch ( Exception $e ) { // some other exception?
9999 $status->fatal( 'backend-fail-internal' );
@@ -111,7 +111,7 @@
112112 } catch ( NoSuchObjectException $e ) {
113113 // NoSuchObjectException thrown: file does not exist
114114 } catch ( InvalidResponseException $e ) {
115 - $status->fatal( 'backend-fail-connect' );
 115+ $status->fatal( 'backend-fail-connect', $this->name );
116116 return $status;
117117 } catch ( Exception $e ) { // some other exception?
118118 $status->fatal( 'backend-fail-internal' );
@@ -131,7 +131,7 @@
132132 } catch ( BadContentTypeException $e ) {
133133 $status->fatal( 'backend-fail-contenttype', $params['dst'] );
134134 } catch ( InvalidResponseException $e ) {
135 - $status->fatal( 'backend-fail-connect' );
 135+ $status->fatal( 'backend-fail-connect', $this->name );
136136 } catch ( Exception $e ) { // some other exception?
137137 $status->fatal( 'backend-fail-internal' );
138138 $this->logException( $e, __METHOD__, $params );
@@ -155,7 +155,7 @@
156156 // (a) Get a swift proxy connection
157157 $conn = $this->getConnection();
158158 if ( !$conn ) {
159 - $status->fatal( 'backend-fail-connect' );
 159+ $status->fatal( 'backend-fail-connect', $this->name );
160160 return $status;
161161 }
162162
@@ -166,7 +166,7 @@
167167 $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
168168 return $status;
169169 } catch ( InvalidResponseException $e ) {
170 - $status->fatal( 'backend-fail-connect' );
 170+ $status->fatal( 'backend-fail-connect', $this->name );
171171 return $status;
172172 } catch ( Exception $e ) { // some other exception?
173173 $status->fatal( 'backend-fail-internal' );
@@ -185,7 +185,7 @@
186186 } catch ( NoSuchObjectException $e ) {
187187 // NoSuchObjectException thrown: file does not exist
188188 } catch ( InvalidResponseException $e ) {
189 - $status->fatal( 'backend-fail-connect' );
 189+ $status->fatal( 'backend-fail-connect', $this->name );
190190 return $status;
191191 } catch ( Exception $e ) { // some other exception?
192192 $status->fatal( 'backend-fail-internal' );
@@ -212,7 +212,7 @@
213213 } catch ( IOException $e ) {
214214 $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
215215 } catch ( InvalidResponseException $e ) {
216 - $status->fatal( 'backend-fail-connect' );
 216+ $status->fatal( 'backend-fail-connect', $this->name );
217217 } catch ( Exception $e ) { // some other exception?
218218 $status->fatal( 'backend-fail-internal' );
219219 $this->logException( $e, __METHOD__, $params );
@@ -242,7 +242,7 @@
243243 // (a) Get a swift proxy connection
244244 $conn = $this->getConnection();
245245 if ( !$conn ) {
246 - $status->fatal( 'backend-fail-connect' );
 246+ $status->fatal( 'backend-fail-connect', $this->name );
247247 return $status;
248248 }
249249
@@ -254,7 +254,7 @@
255255 $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
256256 return $status;
257257 } catch ( InvalidResponseException $e ) {
258 - $status->fatal( 'backend-fail-connect' );
 258+ $status->fatal( 'backend-fail-connect', $this->name );
259259 return $status;
260260 } catch ( Exception $e ) { // some other exception?
261261 $status->fatal( 'backend-fail-internal' );
@@ -273,7 +273,7 @@
274274 } catch ( NoSuchObjectException $e ) {
275275 // NoSuchObjectException thrown: file does not exist
276276 } catch ( InvalidResponseException $e ) {
277 - $status->fatal( 'backend-fail-connect' );
 277+ $status->fatal( 'backend-fail-connect', $this->name );
278278 return $status;
279279 } catch ( Exception $e ) { // some other exception?
280280 $status->fatal( 'backend-fail-internal' );
@@ -287,7 +287,7 @@
288288 } catch ( NoSuchObjectException $e ) { // source object does not exist
289289 $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
290290 } catch ( InvalidResponseException $e ) {
291 - $status->fatal( 'backend-fail-connect' );
 291+ $status->fatal( 'backend-fail-connect', $this->name );
292292 } catch ( Exception $e ) { // some other exception?
293293 $status->fatal( 'backend-fail-internal' );
294294 $this->logException( $e, __METHOD__, $params );
@@ -311,7 +311,7 @@
312312 // (a) Get a swift proxy connection
313313 $conn = $this->getConnection();
314314 if ( !$conn ) {
315 - $status->fatal( 'backend-fail-connect' );
 315+ $status->fatal( 'backend-fail-connect', $this->name );
316316 return $status;
317317 }
318318
@@ -322,7 +322,7 @@
323323 $status->fatal( 'backend-fail-delete', $params['src'] );
324324 return $status;
325325 } catch ( InvalidResponseException $e ) {
326 - $status->fatal( 'backend-fail-connect' );
 326+ $status->fatal( 'backend-fail-connect', $this->name );
327327 return $status;
328328 } catch ( Exception $e ) { // some other exception?
329329 $status->fatal( 'backend-fail-internal' );
@@ -338,7 +338,7 @@
339339 $status->fatal( 'backend-fail-delete', $params['src'] );
340340 }
341341 } catch ( InvalidResponseException $e ) {
342 - $status->fatal( 'backend-fail-connect' );
 342+ $status->fatal( 'backend-fail-connect', $this->name );
343343 } catch ( Exception $e ) { // some other exception?
344344 $status->fatal( 'backend-fail-internal' );
345345 $this->logException( $e, __METHOD__, $params );
@@ -356,7 +356,7 @@
357357 // (a) Get a swift proxy connection
358358 $conn = $this->getConnection();
359359 if ( !$conn ) {
360 - $status->fatal( 'backend-fail-connect' );
 360+ $status->fatal( 'backend-fail-connect', $this->name );
361361 return $status;
362362 }
363363
@@ -364,7 +364,7 @@
365365 try {
366366 $conn->create_container( $fullCont );
367367 } catch ( InvalidResponseException $e ) {
368 - $status->fatal( 'backend-fail-connect' );
 368+ $status->fatal( 'backend-fail-connect', $this->name );
369369 } catch ( Exception $e ) { // some other exception?
370370 $status->fatal( 'backend-fail-internal' );
371371 $this->logException( $e, __METHOD__, $params );
@@ -513,7 +513,7 @@
514514
515515 $conn = $this->getConnection();
516516 if ( !$conn ) {
517 - $status->fatal( 'backend-fail-connect' );
 517+ $status->fatal( 'backend-fail-connect', $this->name );
518518 }
519519
520520 try {
@@ -538,7 +538,7 @@
539539 $output = fopen("php://output", "w");
540540 $obj->stream( $output );
541541 } catch ( InvalidResponseException $e ) {
542 - $status->fatal( 'backend-fail-connect' );
 542+ $status->fatal( 'backend-fail-connect', $this->name );
543543 } catch ( Exception $e ) { // some other exception?
544544 $status->fatal( 'backend-fail-stream', $params['src'] );
545545 $this->logException( $e, __METHOD__, $params );

Status & tagging log