Subject: [clisp-list] uninformative debugger w.r.t. restarts (inconsistency)

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Thu Apr 11 03:57:37 2002

Hi,

I found the help of the debugger w.r.t. restarts to be misleading:

2. Break [8]> (clhs 'car)
** - Continuable Error
SYSTEM::CLISP-DATA-FILE: file #P"H:\\sspace\\src\\clisp-2.28\\data\\clhs.txt" does not exist - adjust *LIB-DIRECTORY*
If you continue (by typing 'continue'): You may input a new value.
The following restarts are available, too:
R1 = You may input a new value.

The naive user now asks: "How to invoke that restart?"

3. Break [9]> (apropos "r1")
SYSTEM::MAKE-VECTOR1&PUSH               
SYSTEM::MEMBER1                            function

Furthermore,

3. Break [9]> (invoke-restart)
** - Continuable Error
EVAL: too few arguments given to INVOKE-RESTART: (INVOKE-RESTART)
If you continue (by typing 'continue'): You may input a new value.
^^^^^^^^^^^^^^^
The following restarts are available, too:
R1 = You may input a new value.

It is not clear at all from the wording of these messages that
"'continue'): You may input a new value" is still about the
prior *lib-directory* and not about the new error that the user faces.
This is quite misleading.

4. Break [10]> continue
New *LIB-DIRECTORY*: 

Surprise! Here I expected I could "input a new value" for
invoke-restart, the last error.

I believe there's some need to revisit what text goes at what time
to which of *debug-io* and *error-output*. I wish it could be more clear.

For orientation, here's what Oaklisp shows:
[oaklisp bytecode emulator. version 1.00. jan 1998.................]
[(c) by barak pearlmutter, kevin lang and alex stuebinger, 1987-98.]
> a
Error: Variable A not found in #<Locale 668>.
Oaklisp evaluation loop.
  Active handlers:
  0: Return to top level.
  1: Install A in #<Locale 668>.
  2: Return to debugger level 1.
>> (with-open-file (inf "foo" in) (read inf))
Error: Unable to open "foo" for READ access.
Oaklisp evaluation loop.
  Active handlers:
  0: Return to top level.
  1: Install A in #<Locale 668>.
  2: Return to debugger level 1.
  3: Supply a file to READ instead (none to retry "foo").
  4: Return to debugger level 2.
>>> (ret 3 "abc")
Invoking handler "Supply a file to READ instead (none to retry "foo")."
Error: Unable to open "abc" for READ access.
Oaklisp evaluation loop.
  Active handlers:
  0: Return to top level.
  1: Install A in #<Locale 668>.
  2: Return to debugger level 1.
  3: Supply a file to READ instead (none to retry "abc").
  4: Return to debugger level 2.
No confusion, not misleading, IMHO.
Oaklisp's error system is very close to Common Lisp's, BTW (handler-bind et al).

Regards,
	Jörg Höhle.