Re: Exception or not

2008-03-03 Thread Bruno Desthuilliers
Monica Leko a écrit : > Suppose you have some HTML forms which you would like to validate. > Every field can have different errors. For example, this are the > forms: > > username > password > etc > > And you want to validate them with some class. This is what the FormEncode package is for.

Re: Exception or not

2008-03-03 Thread Arnaud Delobelle
Monica Leko wrote: > Suppose you have some HTML forms which you would like to validate. > Every field can have different errors. For example, this are the > forms: > > username > password > etc > > And you want to validate them with some class. Is this good pattern: [...] You could have a loo

Re: Exception or not

2008-03-03 Thread Nils Oliver Kröger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I don't think it is a good pattern because you are kind of mixing exceptions with return codes which makes the code a lot less readable later on. I personally would strongly opt for return codes in this case as one would intuitively expect a f