[plt-scheme] Re: HOWTO: SchemeQL + MySQL on OS X

From: Robby Findler (robby at cs.uchicago.edu)
Date: Mon Feb 9 18:30:51 EST 2004

On Feb 9, 2004, at 5:23 PM, David J. Neu wrote:
> I'm using mzscheme for developing cgi-bin scripts, and was wondering
> if there is anyway to grab the file and line number at which an error
> occurred?

If it's a syntax error, you should have one already. To catch the 
runtime errors in a cgi script, prefix your program with:

   (require (lib "errortrace.ss" "errortrace"))

Note: if you're using modules, do not put that into a module. It must 
happen before any of your modules are loaded (you can also change the 
commandline arguments to something like mzscheme by adding -L 
errortrace.ss errortrace -qu myscript.ss if myscript.ss contains the 
main module).

This provides the same raw information that drscheme uses to show stack 
traces (ie, when you click on the little bug in the interactions 
window), but just without the integration to the PDE.


Posted on the users mailing list.