How to register a global exception handler in NOP4.0?

2 months ago
I'm using nop4.0 for development, and now I have such a demand: for some routes, its controller method throws an exception (I didn't catch it in the controller method). I hope that when I jump to this route, the page will not display our exception information, but jump to my own customized page. What should I do? One way I think of is to use the global exception filter to deal with it, but I don't know how to implement and where to put this global exception handler.
2 months ago
Check your web.config file.  Do you have a customErrors element?

Maybe you turned it off:
  <customErrors defaultRedirect="errorpage.htm" mode="Off">

Try turning it on
  <customErrors defaultRedirect="errorpage.htm" mode="On">