From: jenkins-bot Date: Wed, 29 May 2019 20:21:01 +0000 (+0000) Subject: Merge "Print chained exceptions when maintenance script fails." X-Git-Tag: 1.34.0-rc.0~1562 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=243a466018d24415de27815cfae995865c45a66a Merge "Print chained exceptions when maintenance script fails." --- 243a466018d24415de27815cfae995865c45a66a diff --cc maintenance/doMaintenance.php index 94ae95d73d,816b385307..0ee1e6a0b8 --- a/maintenance/doMaintenance.php +++ b/maintenance/doMaintenance.php @@@ -92,10 -90,18 +92,20 @@@ $maintenance->checkRequiredExtensions() // This avoids having long running scripts just OOM and lose all the updates. $maintenance->setAgentAndTriggers(); +$maintenance->validateParamsAndArgs(); + // Do the work - $success = $maintenance->execute(); + try { + $success = $maintenance->execute(); + } catch ( Exception $ex ) { + $success = false; + while ( $ex ) { + $cls = get_class( $ex ); + print "$cls from line {$ex->getLine()} of {$ex->getFile()}: {$ex->getMessage()}\n"; + print $ex->getTraceAsString() . "\n"; + $ex = $ex->getPrevious(); + } + } // Potentially debug globals $maintenance->globals();