Current theory on T138585 is that something is passing in false, so
let's throw an InvalidArgumentException that should log a backtrace for
us.
Bug: T138585
Change-Id: Iba0dad424c56340b8bc73322bb1a7ae6d4de314a
parent::__construct( $message, $code );
$this->mCodestr = $codestr;
$this->mExtraData = $extradata;
+
+ // This should never happen, so throw an exception about it that will
+ // hopefully get logged with a backtrace (T138585)
+ if ( !is_string( $codestr ) || $codestr === '' ) {
+ throw new InvalidArgumentException( 'Invalid $codestr, was ' .
+ ( $codestr === '' ? 'empty string' : gettype( $codestr ) )
+ );
+ }
}
/**