In my plugin, I'd like to catch errors when they appear in the control panel, so I can handle them differently. However, from the front-end, I'd like to keep the default Craft-style handling of error messages.
try
{
// Some code which might produce an error
}
catch (\Exception $e)
{
if (craft()->request->isCpRequest()) {
// Do something with $e->getMessage()
} else {
// Use default Craft error handling
}
}
All of that is working for me, just trying to sort out how to do this part...
// Use default Craft error handling
How can I get my error handling to just go back to what Craft was doing by default? I want to make sure my errors still appear in devMode per usual.