replace Exception on GeneralException
This commit is contained in:
@ -72,7 +72,7 @@ class FormField
|
||||
$name = $validator . 'Validator';
|
||||
$validator = new $name();
|
||||
} else {
|
||||
throw new Exception('Invalid validator provided to addValidator; must be string or iValidator');
|
||||
throw new InitializationException('Invalid validator provided to addValidator; must be string or iValidator');
|
||||
}
|
||||
$this->validators[$name] = $validator;
|
||||
return $this;
|
||||
@ -94,7 +94,7 @@ class FormField
|
||||
$name = $filter . 'Filter';
|
||||
$filter = new $name();
|
||||
} else {
|
||||
throw new Exception('Invalid filter provided to addFilter; must be string or iFilter');
|
||||
throw new InitializationException('Invalid filter provided to addFilter; must be string or iFilter');
|
||||
}
|
||||
$this->filters[$name] = $filter;
|
||||
return $this;
|
||||
@ -147,7 +147,7 @@ class FormField
|
||||
if (!$validator->isValid($val, $context)) {
|
||||
$valid = false;
|
||||
if (!$this->default_message) {
|
||||
throw new Exception('Define default message for array fields');
|
||||
throw new InitializationException('Define default message for array fields');
|
||||
}
|
||||
$this->message = $this->default_message;
|
||||
}
|
||||
|
Reference in New Issue
Block a user