dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Added option to specify "Various authors" as author in extension credits using...
[lhc/web/wiklou.git]
/
maintenance
/
doMaintenance.php
diff --git
a/maintenance/doMaintenance.php
b/maintenance/doMaintenance.php
index
0ee1e6a
..
fe4905b
100644
(file)
--- a/
maintenance/doMaintenance.php
+++ b/
maintenance/doMaintenance.php
@@
-99,12
+99,20
@@
try {
$success = $maintenance->execute();
} catch ( Exception $ex ) {
$success = false;
$success = $maintenance->execute();
} catch ( Exception $ex ) {
$success = false;
+ $exReportMessage = '';
while ( $ex ) {
$cls = get_class( $ex );
while ( $ex ) {
$cls = get_class( $ex );
-
print
"$cls from line {$ex->getLine()} of {$ex->getFile()}: {$ex->getMessage()}\n";
-
print
$ex->getTraceAsString() . "\n";
+
$exReportMessage .=
"$cls from line {$ex->getLine()} of {$ex->getFile()}: {$ex->getMessage()}\n";
+
$exReportMessage .=
$ex->getTraceAsString() . "\n";
$ex = $ex->getPrevious();
}
$ex = $ex->getPrevious();
}
+ // Print the exception to stderr if possible, don't mix it in
+ // with stdout output.
+ if ( defined( 'STDERR' ) ) {
+ fwrite( STDERR, $exReportMessage );
+ } else {
+ echo $exReportMessage;
+ }
}
// Potentially debug globals
}
// Potentially debug globals