|
Good catch, thanks! I knew I should have pulled up the IDE instead of just typing that in here.
Anybody else can use the code Adam and I pieced together in your systems. Users hate errors, and expect you to fix them in a hurry. Under the defaults if you're running ASP.NET it will only show what caused the error if you're using the server to surf to that page and get an error - from a different machine you get a page that says "Oops!" But the cause of the error is available in these variables, except they use line breaks, which get ignored when you render them with html. So we simply force a <br> where you would expect a line break in the report, to make it easier to read.
For extra credit, you could set this to email you whenever an error happens, with the details of what caused it. Then you might be able to fix some of them before your users even complain.
|