handle +cgi
Catches any exception thrown by the given CGI action, returns an error page with a 500 Internal Server Error, showing the exception information, and logs the error.
Typical usage:
> cgiMain :: CGI CGIResult
> cgiMain = ...
>
> main :: IO ()
> main = runCGI (handleErrors cgiMain)