Raising exceptions outside controller

Hi, I have an error action in my sitecontroller, but I would like to raise an exception from a filter.

Can someone please give an example of how I can catch the exception in the error action, and show the error in a user-friendly way? Only throwing the exception just gives a blank page with the error name and trace, not using the views like I would raise the exception in the controller itself.

You should check a stack error that you have. Because may be error is not from filter.

The error is an exception I explicitly throw. The behaviour of throwing an exception in the controller where the error action resides is different than elsewhere in the app.

Hi, you can have a look here. Hope it’s useful.

that’s not even remotely related to my problem.