Cutom View On Exception


I am using widgets for various parts of my web project. Lets say I load 3 widgets on a page.

In all of my widgets, i want to raise various custom exceptions, and want to load a custom error page/view for each specific exception.

So, if 2 of widgets raised their exceptions, page will have one widget loaded successfully and 2 widgets showing their custom error messages.

Any idea ?

Surely when you call the widget you could just go:

try {



catch (Exception $e) {

    // Exception has been raised, do what you want