[gambit-list] gsi / error handling /debug-repl

Marc Feeley feeley at iro.umontreal.ca
Tue Jan 27 15:59:56 EST 2009


On 27-Jan-09, at 3:44 PM, symbolic expression wrote:

>
> $ cat test.scm:
> (eval '(+ 1 (+ 2 'a)))
>
> $ gsi test.scm
> *** ERROR -- (Argument 2) NUMBER expected
> (+ 2 'a)
> $

Use the -:dr runtime option (which starts a REPL when an exception is  
raised rather than terminating gsi):

% cat test.scm
(pp (+ 1 (+ 2 'a)))
% gsi test.scm
*** ERROR IN "test.scm"@1.10 -- (Argument 2) NUMBER expected
(+ 2 'a)
% echo $?
70
% gsi -:dr test.scm
*** ERROR IN "test.scm"@1.10 -- (Argument 2) NUMBER expected
(+ 2 'a)
 > ,(c 3)
4

Marc




More information about the Gambit-list mailing list