[plt-scheme] Exception trace

From: Dave Gurnell (d.j.gurnell at gmail.com)
Date: Thu Jun 8 07:12:03 EDT 2006

Apologies if this is obvious... I scanned the docs but couldn't find  
an answer.

I'm getting an exn:fail somewhere deep in my code that I want to  
prevent. However, the trace I get back is very long and MzScheme  
gives up and writes an ellipsis before I get to the useful bit of the  
trace:

=== context ===
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/filter.ss:68:4
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/xshtml-render.ss: 
279:14: loop
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/xshtml-render.ss: 
233:12: display-element
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/xshtml-render.ss: 
329:14: loop
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/xshtml-render.ss: 
233:12: display-element
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/xshtml-render.ss: 
329:14: loop
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/xshtml-render.ss: 
233:12: display-element
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/xshtml-render.ss: 
329:14: loop
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/xshtml-render.ss: 
233:12: display-element
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/xshtml-render.ss: 
329:14: loop
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/xshtml-render.ss: 
233:12: display-element
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/xshtml-render.ss: 
329:14: loop
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/xshtml-render.ss: 
233:12: display-element
/data/www/uk/ac/qmul/sbcs/www2/demo/lib/lylux/view/render.ss:31:4:  
render-xshtml
define/contract-contract-id-render-xshtml
define/contract-contract-id-render-xshtml
...

The error is happening in the middle of a bunch of redirects between  
my web site and another (authentication) site, and it might be caused  
by my code or someone else's. I really need to extend this trace to  
find out which high level procedure is the root of the problem.

I've tried sticking:

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

in the main file for my program, but it doesn't seem to make any  
difference to the output. I have a hunch that this won't work because  
I'm using web-server and Noel Welsh's "instaweb" package (one of the  
Schematics packages on Planet), one of which does something clever  
with compilation that I don't understand.

Is there any way I can increase the length of the stack trace from  
the MzScheme error handler so I can see where this error is coming from?

Cheers,

-- Dave


Posted on the users mailing list.