/** * Constructor */ public function __construct($message, array $migration, array $variables = array(), $code = 0) { $variables[':migration-id'] = $migration['id']; $variables[':migration-group'] = $migration['mgroup']; $this->_migration = $migration; parent::__construct($message, $variables, $code); }
/** * Constructs a new exception for the specified model * * @param string $alias The alias to use when looking for error messages * @param Validation $object The Validation object of the model * @param string $message The error message [Optional] * @param array $values The array of values for the error message [Optional] * @param integer $code The error code for the exception [Optional] */ public function __construct($alias, Validation $object, $message = 'Failed to validate array', array $values = NULL, $code = 0) { $this->_alias = $alias; $this->_objects['_object'] = $object; $this->_objects['_has_many'] = FALSE; parent::__construct($message, $values, $code); }
/** * Creates a new translated exception * * Example: * ~~~ * throw new HTTP_Exception('Something went terrible wrong, :user', * array(':user' => $user) * ); * ~~~ * * @param string $message Status message, custom content to display with error [Optional] * @param array $variables Translation variables [Optional] * @param Exception $previous Previous exception [Optional] */ public function __construct($message = NULL, array $variables = NULL, Exception $previous = NULL) { parent::__construct($message, $variables, $this->_code, $previous); }
/** * Validation constructor * * @param Validation $array Validation object * @param string $message Error message [Optional] * @param array $values Translation variables [Optional] * @param integer $code The exception code [Optional] * @param Exception $previous Previous exception [Optional] */ public function __construct(Validation $array, $message = 'Failed to validate array', array $values = NULL, $code = 0, Exception $previous = NULL) { $this->array = $array; parent::__construct($message, $values, $code, $previous); }