This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Error Messages


Westley A Sherman writes:

 > Is there an easy way to get informative error messages using the
 > gh_eval_str functions?
 > 
 > Using the interpreter one can get messages such as
 > 
 > guile> (defin x 1)
 > ERROR: In expression (defin x 1):
 > ERROR: Unbound variable: defin
 > ABORT: (misc-error)
 > 
 > Type "(backtrace)" to get more information.
 > guile>
 > 
 > but with
 > 
 >   gh_eval_str_with_standard_handler("(defin x 1)");
 > 
 > one only gets the message
 > 
 > Just got an error; tag is
 >         misc-error
 > 
 > which is fairly terse from the standpoint of debugging guile code.

the above messages are issued by

	backtrace.c:		display_error_body()
	backtrace.c:		scm_display_error() (aka `display-error')
	boot-9.scm:		handle-system-error
	boot-9.scm:		error-catching-loop
	boot-9.scm:		error-catching-repl
	boot-9.scm:		scm-style-repl
	boot-9.scm:		top-repl

someone more experienced w/ guile/C interaction should recommend the
proper place to emulate.  i was going to suggest `error-catching-loop'
but am not sure what the module/environment implications are.

thi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]