[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MIT-Scheme-devel] How to run a script and exit?

From: Taylor R Campbell
Subject: Re: [MIT-Scheme-devel] How to run a script and exit?
Date: Sun, 8 Sep 2019 21:10:59 +0000

> Date: Mon, 9 Sep 2019 01:44:40 +0800
> From: SB <address@hidden>
> Your solution mostly works. It does not work when there is an error in the
> code. When there is an error, MIT Scheme starts the debugger instead of
> immediately exiting with a non-zero exit code. Is there a way to
> immediately exit with a non-zero exit code when something goes wrong in the
> code?

Could do something like

mit-scheme --eval '(bind-condition-handler (list condition-type:error) (lambda 
(c) c (exit 123)) (lambda () (load "script") (exit 0)))'

(It is kind of silly that something like this is not built-in.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]