Hi everyone, I have a bootstrap_web.php file in my multi module application. which has try catch approach.
When my application throws an exception, the page shows the message but does not follow the theme and shows the message in a white page.
my code in catch section is:
} catch (\Exception $e) {
echo $e->getMessage() . '<br>';
echo '<pre>' . $e->getTraceAsString() . '</pre>';
}
Now, I want the catch section to set a flash message and redirect to the last page where exception occurred.
How can i do that?