A project I'm working on requires custom modules, and I'll be the last person to claim that I am perfect. I've gone through and removed as many possible php errors and causes for WSODs that I can think of, and I haven't had any recently. In the case that an error does happen with my code it will affect a single page load, it won't totally take the site down. The last thing I want is a user seeing a clearly broken page with text saying "your website is broken".
Is there a way I can display/redirect to a general (and pretty) "There was a problem completing your request, please contact site administrators" error page?
'onKernelException'
and check the response-code