diff options
Diffstat (limited to 'includes/DeferredUpdates.php')
-rw-r--r-- | includes/DeferredUpdates.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/includes/DeferredUpdates.php b/includes/DeferredUpdates.php index 89c4df68..c385f138 100644 --- a/includes/DeferredUpdates.php +++ b/includes/DeferredUpdates.php @@ -64,6 +64,16 @@ class DeferredUpdates { } /** + * Add a callable update. In a lot of cases, we just need a callback/closure, + * defining a new DeferrableUpdate object is not necessary + * @see MWCallableUpdate::__construct() + * @param callable $callable + */ + public static function addCallableUpdate( $callable ) { + self::addUpdate( new MWCallableUpdate( $callable ) ); + } + + /** * Do any deferred updates and clear the list * * @param string $commit set to 'commit' to commit after every update to @@ -99,7 +109,7 @@ class DeferredUpdates { // be reported to the user since the output is already sent. // Instead we just log them. if ( !$e instanceof ErrorPageError ) { - wfDebugLog( 'exception', $e->getLogMessage() ); + MWExceptionHandler::logException( $e ); } } } |