Log pool counter errors
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 19 Mar 2011 12:06:04 +0000 (12:06 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 19 Mar 2011 12:06:04 +0000 (12:06 +0000)
includes/PoolCounter.php

index 3851767..c24993e 100644 (file)
@@ -134,6 +134,13 @@ abstract class PoolCounterWork {
        function error( $status ) {     
                return false;
        }
+
+       /**
+        * Log an error
+        */
+       function logError( $status ) {
+               wfDebugLog( 'poolcounter', $status->getWikiText() );
+       }
        
        /**
         * Get the result of the work (whatever it is), or false.
@@ -180,6 +187,7 @@ abstract class PoolCounterWork {
                                        /* continue to the error */
                        }
                }
+               $this->logError( $status );
                return $this->error( $status );
        }