Apparently Jenkins sets $wgShowExceptionDetails to true but travis
doesn't. The test should make sure it's set since it depends on it.
And apparently no one ever added $wgShowDBErrorBacktrace to the API.
Let's do that too.
Change-Id: I0793eda349426b265a47900cdeb87bb920b5c291
- if ( $config->get( 'ShowExceptionDetails' ) ) {
+ if ( $config->get( 'ShowExceptionDetails' ) &&
+ ( !$e instanceof DBError || $config->get( 'ShowDBErrorBacktrace' ) )
+ ) {
$result->addContentValue(
$path,
'trace',
$result->addContentValue(
$path,
'trace',
$context->setRequest( new FauxRequest( [ 'errorformat' => 'plaintext' ] ) );
$context->setLanguage( 'en' );
$context->setConfig( new MultiConfig( [
$context->setRequest( new FauxRequest( [ 'errorformat' => 'plaintext' ] ) );
$context->setLanguage( 'en' );
$context->setConfig( new MultiConfig( [
- new HashConfig( [ 'ShowHostnames' => true, 'ShowSQLErrors' => false ] ),
+ new HashConfig( [
+ 'ShowHostnames' => true, 'ShowSQLErrors' => false,
+ 'ShowExceptionDetails' => true, 'ShowDBErrorBacktrace' => true,
+ ] ),
$context->getConfig()
] ) );
$context->getConfig()
] ) );