Added cgi.ss and cgi-errors-to-browser.ss to the lib directory.

This commit is contained in:
Abdulaziz Ghuloum
2007-01-13 13:03:23 -05:00
parent 1a7a4e1c2a
commit 8b9dd5fd85
2 changed files with 98 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
(module ()
#| set the error handler to output an error page should
an error occur |#
(error-handler
(lambda (who msg . args)
(display "Content-type: text/html\n\n")
(display "<font color=\"red\"><pre>")
(if who
(printf "Error: ~a.\n" (apply format msg args))
(printf "Error in ~a: ~a.\n" who (apply format msg args)))
(display "</pre></font>")
(exit 0))))