MWExceptionHandler::getRedactedTraceAsString( $dbex )
)->inLanguage( 'en' )->useDatabase( false )->text();
+ MediaWiki\suppressWarnings();
+ $usageEx = new UsageException( 'Usage exception!', 'ue', 0, [ 'foo' => 'bar' ] );
+ MediaWiki\restoreWarnings();
+
$apiEx1 = new ApiUsageException( null,
StatusValue::newFatal( new ApiRawMessage( 'An error', 'sv-error1' ) ) );
TestingAccessWrapper::newFromObject( $apiEx1 )->modulePath = 'foo+bar';
]
],
[
- new UsageException( 'Usage exception!', 'ue', 0, [ 'foo' => 'bar' ] ),
+ $usageEx,
[ 'existing-error', 'ue' ],
[
'warnings' => [