The current output "Bad value for parameter $dbkey: invalid DB key" is
useless for actually working out which DB key is to blame.
Bug: T146778
Change-Id: Iaf57e25ab27b5065469c5dc5de0a1b881c48210c
Assert::parameterType( 'string', $interwiki, '$interwiki' );
// Sanity check, no full validation or normalization applied here!
Assert::parameterType( 'string', $interwiki, '$interwiki' );
// Sanity check, no full validation or normalization applied here!
- Assert::parameter( !preg_match( '/^_|[ \r\n\t]|_$/', $dbkey ), '$dbkey', 'invalid DB key' );
+ Assert::parameter( !preg_match( '/^_|[ \r\n\t]|_$/', $dbkey ), '$dbkey',
+ "invalid DB key '$dbkey'" );
Assert::parameter( $dbkey !== '', '$dbkey', 'should not be empty' );
$this->namespace = $namespace;
Assert::parameter( $dbkey !== '', '$dbkey', 'should not be empty' );
$this->namespace = $namespace;