Hi, i'm wondering how i can display the error page found in the shared views folder when 1) an exception is thrown 2) i want to redirect there with an error message that happened outside a catch block.
I'm not sure how it's activated. So if I do this and get an exception:
try { await emailSender.SendEmailAsync("johan.herstad@gmail.com", "Waffles recipe", text); } catch (Exception ex) { throw new ApplicationException($"Something went wrong '{ex.Message}'."); }
Will the error page display in production with that message? Because I don't get that error page in development.