[eluser]jimps[/eluser]
[quote author="Buso" date="1277777149"]On failure I always return FALSE, and report the error in 2 different ways:
If the model method is directly related to the output, like when a user tries to login() and makes a mistake like writting a wrong password, I use a method I added to the base controller: add_errors(). It saves the error in a errors array, and then I fetch them with another method: errors(), which adds html tags to them, like <p='error'>one of the errors</p>.
In any other case I just save the errors to the error array of the object which detected the error (in our case, the model object), just in case I need them for debugging or something.[/quote]
Oh, that's quite smart! But how do you communicate with the base controller from within the model?
Best regards,
Jimps