Error Handling In Controllers - Best Pratice?

Hello,

I would like to know how the proper error handling in controllers looks like. I’ve already read this guide, but it isn’t that what I’m looking for.

I’m currently using CHttpException on some parts of my script. But I need something that doesn’t stops the whole application. addError() doesn’t seem the right function for this as it should only be used in models.

You can use your own exception class by extending some existing ones and catch it in the right place.