// Save filtered text to Memcached
$cache->set( $key, $result );
- } catch ( Exception $exception ) {
- $exception->logException();
- wfDebugLog( 'resourceloader', __METHOD__ . ": minification failed: $exception" );
+ } catch ( Exception $e ) {
+ MWExceptionHandler::logException( $e );
+ wfDebugLog( 'resourceloader', __METHOD__ . ": minification failed: $e" );
$this->hasErrors = true;
// Return exception as a comment
- $result = self::formatException( $exception );
+ $result = self::formatException( $e );
}
wfProfileOut( __METHOD__ );
try {
$this->preloadModuleInfo( array_keys( $modules ), $context );
} catch ( Exception $e ) {
- $e->logException();
+ MWExceptionHandler::logException( $e );
wfDebugLog( 'resourceloader', __METHOD__ . ": preloading module info failed: $e" );
$this->hasErrors = true;
// Add exception to the output as a comment
// Calculate maximum modified time
$mtime = max( $mtime, $module->getModifiedTime( $context ) );
} catch ( Exception $e ) {
- $e->logException();
+ MWExceptionHandler::logException( $e );
wfDebugLog( 'resourceloader', __METHOD__ . ": calculating maximum modified time failed: $e" );
$this->hasErrors = true;
// Add exception to the output as a comment
* and clear out the output buffer. If the client cache is too old then do nothing.
* @param $context ResourceLoaderContext
* @param string $mtime The TS_MW timestamp to check the header against
- * @return bool True iff 304 header sent and output handled
+ * @return bool True if 304 header sent and output handled
*/
protected function tryRespondLastModified( ResourceLoaderContext $context, $mtime ) {
// If there's an If-Modified-Since header, respond with a 304 appropriately
try {
$blobs = MessageBlobStore::get( $this, $modules, $context->getLanguage() );
} catch ( Exception $e ) {
- $e->logException();
+ MWExceptionHandler::logException( $e );
wfDebugLog( 'resourceloader', __METHOD__ . ": pre-fetching blobs from MessageBlobStore failed: $e" );
$this->hasErrors = true;
// Add exception to the output as a comment
break;
}
} catch ( Exception $e ) {
- $e->logException();
+ MWExceptionHandler::logException( $e );
wfDebugLog( 'resourceloader', __METHOD__ . ": generating module package failed: $e" );
$this->hasErrors = true;
// Add exception to the output as a comment