I've done lots of web, db programming and have found the method that works best for me is to tail the error_log.
Other than that, there is always the fatalsToBrowser thingy or perhaps creating a __DIE__ handler that will print something nice to the browser for you.
Comment on Re: Printing DBI errors from a CGI script