7 use UnexpectedValueException;
42 parent::__construct( self::formatMessage( $name, $code, $data ), 0, $previous );
44 $this->paramName = $name;
45 $this->paramValue = $value;
47 $this->failureCode = $code;
48 $this->failureData = $data;
59 $ret =
"Validation of `$name` failed: $code";
60 foreach ( $data as $k => $v ) {
61 if ( is_array( $v ) ) {
62 $v = implode(
', ', $v );