Lisp HUG Maillist Archive

Funny LW error (terminal popup on 9th error)

Open LispWorks (I noticed this with v5.1.1 Mac Intel).

Type in a in the Listener.

-->

Error: The variable A is unbound.
   1 (continue) Try evaluating A again.
   2 Return the value of :A instead.
   3 Specify a value to use this time instead of evaluating A.
   4 Specify a value to set A to.
   5 (abort) Return to level 0.
   6 Return to top loop level 0.

Type :b for backtrace, :c <option number> to proceed,  or :? for other options

Now, type again a, and repeat it for 7 times. You get the same
error message.

What is bothering me is that when a is typed again, the Terminal
Window pops up.

- Why the Listener can handle only 8 errors, and then use the Terminal?
- I would like the Listener handle all errors, since it is annoying
to get the Terminal popup, and then type :top or other option to let
the control return back to LispWorks.
- A. Is there a way to increase Listener error handling capabilities
to hundreds of error cases instead of 8?
- B. Or better: is there a way NOT to popup Terminal in any case (and
maybe let the error situation return automatically to the top level)?

I know that the typical answer would be that you have to define your
own error handlers, or that it is not possible.

Console popup is a very bad interface design for the Mac, since it halts
execution totally and requests further information with clumsy
pre-graphical interface commands, that was maybe cool 20 years ago, but
should not be part of a modern application.

If anybody has an example how to patch A or B, that would increase LW
user-experience a lot!

Pekka


Re: Funny LW error (terminal popup on 9th error)

On 25 Jun 2009, at 14:31, Pekka Tolonen wrote:

> - Why the Listener can handle only 8 errors, and then use the  
> Terminal?

I'm guessing that the problem is not 8 errors, but 8 *nested* errors,  
at which point it is giving up and deciding that all is lost.


Re: Funny LW error (terminal popup on 9th error)

Unable to parse email body. Email id is 9259

Re: Funny LW error (terminal popup on 9th error)

>  > - I would like the Listener handle all errors, since it is annoying
>>  to get the Terminal popup, and then type :top or other option to let
>>  the control return back to LispWorks.
>
>Why do you get 8 nested errors in real situations?

To me Terminal Window and having debugging options to choose while 
testing the algorithm is the most disturbing thing.

If the algorithm is buggy, all I want to have a short description of 
the error ... and then rethink it - and not spend time examining my 
buggy algorithm on the debugger -> is more simpler that way :-)

How about adding master error control, where the user can set up the behaviour:

(setq *master-error-control* :signal-no-error-autostart-toplevel)

This would be very useful for delivery apps, where it now needs huge 
amounts of handler-case protection in myriad places, and still the 
Terminal keeps up popping every now and them, driving you and your 
app users mad.

(setq *master-error-control* :signal-simple-error-autostart-toplevel)

Tells just "unbound variable a" in a popup window (inside the app, 
and not in the Terminal) and restarts toplevel.

(setq *master-error-control* 
:signal-simple-error-autostart-toplevel-show-backtrace)

Tells "unbound variable a" & backtrace in a popup window (inside the 
app, and not in the Terminal) and restarts toplevel.

(setq *master-error-control* :enter-debugger-on-listener)

As now, but instead Terminal always uses the Listener.

(setq *master-error-control* :enter-debugger-on-terminal)

Uses Terminal.

>  > Console popup is a very bad interface design for the Mac, since it halts
>>  execution totally and requests further information with clumsy
>>  pre-graphical interface commands, that was maybe cool 20 years ago, but
>>  should not be part of a modern application.
>
>It halts execution because it is used to debug the cause of the nested error
>without anything else changing.  This is important for errors caused by window
>system events.
>
>If we can decide which nested error situations are useful and which are bugs,
>then we will try to avoid showing the Console in more cases.
>

With the above *master-error-control* you could set up it for the terminal when
you need window system event debugging.

But for the rest of us having a Terminal and backtrace showing dozens of
UNDOCUMENTED CAPI CALLS is not very useful, even if the case is debugging our
own interfaces :-)

Pekka


Re: Funny LW error (terminal popup on 9th error)

Unable to parse email body. Email id is 9268

Re: Funny LW error (terminal popup on 9th error)

Sounds very good. Please do provide an example how to make it.

Pekka

>On 26 Jun 2009, at 05:14, Pekka Tolonen wrote:
>>
>>This would be very useful for delivery apps, where it now needs 
>>huge amounts of handler-case protection in myriad places, and still 
>>the Terminal keeps up popping every now and them, driving you and 
>>your app users mad.
>
>This really isn't true.  When I wrote deliverable things in LW I had 
>some simple wrapper macro which went around every thread which 
>provided condition-handlers of last resort.  It was not complicated, 
>and it worked very well.


Updated at: 2020-12-10 08:41 UTC