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

Re: What happens when no handler is found?



    Date: 6 Jan 1986 21:55-CST
    From: marick@gswd-vms.arpa

    Okay, you've convinced me that programs might very often signal
    conditions without handlers; often enough that it ought to be 
    simple to do.  Nevertheless, I still think there is a class of
    conditions (perhaps exemplified by EOF) where

    1.  It is a programmer error if there is no handler.
    2.  It's inelegant to consider the condition a subtype of ERROR.
    3.  A missing handler is better reported as MISSING-HANDLER
	than ERROR:  EOF.

    Of course, it's simple enough to make a subtype of CONDITION
    called MUST-BE-HANDLED-CONDITION and a global handler for it
    that signals the programmer error.  Should that condition and
    its handler be part of the standard?

I don't buy your EOF example, but it's true that in Symbolics'
condition system there is a condition named DEBUGGER-CONDITION,
which is the root from which the behavior of going into the debugger
if there is no handler is inherited, and ERROR is actually a
specialization of DEBUGGER-CONDITION.  There are 12 other specializations
of DEBUGGER-CONDITION, which fall into two categories: conditions that
are part of the intestines of the debugger, and conditions (like stack
overflow) that need to be handled but are not actually errors, at
least not errors at the specific place where they happen to be detected.

The key point here is that "the type of condition that goes into the
debugger when not handled" and "the type of condition that is caught
by IGNORE-ERRORS" are very similar, but not identical.

I suppose this condition probably does need to be part of the standard.
There might be a better name than DEBUGGER-CONDITION.  Maybe KMP can
demonstrate a reason why this condition isn't really needed in the
portable language.