Re: line number that generated exception

"Scott G. Miller" <[email protected]> Mon, 12 Mar 2007 07:46:13 -0500
Newsgroups gmane.comp.java.sisc.user
Message-ID <[email protected]>
On Mon, Mar 12, 2007 at 09:57:50AM +0100, Antonio wrote:
> Hello all,
> 
> Is it possible to determine which line in a source file generated a 
> SchemeException? If so, how?

Yes, that is possible.  The SchemeException contains the continuation of 
the error, in the "e" field.  It should be a Continuation, in which case 
it has a "tracer" member, which can get you the stack trace by calling 
its toValue() method.  For all of this to work, stack tracing must be 
on, which it is by default.

Scott




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV