Error Handling in Model (MVC)

Posted by Andre on Stack Overflow See other posts from Stack Overflow or by Andre
Published on 2009-09-20T21:28:36Z Indexed on 2010/05/12 14:04 UTC
Read the original article Hit count: 193

Filed under:
|
|
|

I was wondering what the excepted standard is for handling errors in the Model.

Currently I have 'setError' and 'getError' methods that's in use by all my Models.

This means I'm only concerned with whether a call to a method in my Model is true or false. If it's false then I would use $this->model->getError() in my Controller.

Additionally I'm contemplating setting up a separate file that contains all my errors. One file per model, also wanted to have thoughts on this.

© Stack Overflow or respective owner

Related posts about model

Related posts about error-handling