The production environment, from an error-reporting perspective, needs to be as tightly controlled as possible. You want to fully control what the end user sees and experiences. Things like SQL failures and code syntax warnings should never be seen by the client, if at all possible. Your code base, of course, should be well mitigated by this time—if you have been using the two aforementioned environments properly and religiously—but sometimes errors and bugs can still get through to production. If you’re going to fail in production, you want to fail as gracefully and as quietly as possible.
Consider using 404 page redirects and
try...catch structures to redirect errors and
failures to a safe landing area in the production environment. See Chapter 2 for proper coding styles of the
At the very least, all error reporting should be suppressed and sent to the logfiles in the production environment.