[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parsing eval errors
From: |
Neil Jerram |
Subject: |
Re: Parsing eval errors |
Date: |
Thu, 11 Jun 2009 22:57:46 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Chris Dennis <address@hidden> writes:
> Hello Guilers
Hi Chris,
> Is there some code anywhere for parsing the error information caught
> from local-eval?
>
> The following code is the best I have come up with so far, but the
> messages it produces aren't pretty:
>
> (define (error-handler key . args)
> (display (object->string key))
> (for-each (lambda (arg)
> (display (_ ", arg="))
> (display (object->string arg)))
> args)
> (newline))
>
> (catch #t (local-eval s-expr (the-environment))
> error-handler)
There's a routine called `handle-system-error' in ice-9/boot-9.scm,
which the REPL uses for printing out "system" errors. "System" errors
roughly means those generated from the internals of libguile, plus any
application errors that were originated by calling the procedures that
libguile provides for error reporting (node `Error Reporting' in the
manual).
Hope that's some help...
Neil