[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
saving and restoring the error stack trace
From: |
Marco Maggi |
Subject: |
saving and restoring the error stack trace |
Date: |
Thu, 24 Aug 2006 21:34:35 +0200 |
Ciao,
I am interfacing the GSL ordinary differential
equations solver with Guile. I have the following
stack of invocations:
my-scheme-implemented-scheme-function
|
->my-C-implemented-scheme-function
|
->gsl_odeiv_evolve_apply
|
->my_C_callback
|
->scm_internal_catch
|
->my_other_C_callback
|
->my-other-scheme-impl-scheme-function
If an error occurs in the invocation of
my-other-scheme-impl-scheme-function I want a
full stack trace of the error be shown to the
user that invoked my-scheme-implemented-scheme-function
at the REPL.
I cannot let the dynwind mechanism pass through
gsl_odeiv_evolve_apply, that is why I am using
scm_internal_catch. But in this way if I rethrow
the exception in my-C-implemented-scheme-function
I loose the stack trace that includes the body
of my-other-scheme-impl-scheme-function.
For the ones that know how Tcl works: what I want
is the same as saving the "errorInfo" global variable
and restoring it later.
Is there a way?
--
Marco Maggi
"They say jump!, you say how high?"
Rage Against the Machine - "Bullet in the Head"
- saving and restoring the error stack trace,
Marco Maggi <=