Thanks guys, I agree the validator isn't encountering an exceptional
condition so shouldn't throw an exception.

Whether the user code (in this case createUser) should seems to come
down to whether invalid data (or to put it another way, data that
breaks the normal functionality of the code), is an unusual situation.
I'm inclined to say it is, just because you expect it to happen
doesn't negate it unusualness: its a known unknown ;).

@Eric: the code in question is just example code using the validator
(a couple of controller methods), rather than anything in the symfony
code.

On Mar 26, 2:07 pm, Bernhard Schussek <[email protected]> wrote:
> Exceptions aren't used because a validator is used to validate values,
> and both invalid and valid values are expected inputs. What you do
> with the errors the validator returns you lies in your hands.
>
> Exceptions are raised if the validator can't process a value for some
> other reason (invalid type etc.).
>
> Bernhard

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to