Re: error handling

Ian E. Stockdale (ies@nas.nasa.gov)
Fri, 23 May 1997 11:14:17 -0700 (PDT)

Regarding John May's comments on Marc Snir's option "C":
>Con: since no type checking is possible even at runtime, and since
>all error handlers look alike, there is a danger that the user
>will, for example, associate the same error handler with all
>three kinds of object. This won't be detected until an actual ...

I agree with this assessment. While we are dealing with admittedly
rare circumstances - a user who *does* write an error handler - it
seems at least a little undesireable to introduce an additional
runtime failure mode into a situation which only exists when you
already have an error.

>Pro: perhaps the user *wants* to write one error handler for all
>three handles. If the handler ignores the handle passed in, it can
>serve all three types of handle.

This isn't a large burden. Also, I expect that users will only be
writing error handlers for one of the three possibilities (comm,
file, win) anyways.

>On balance, I favor B slightly.

Agreed.

My guess is that most error handlers (not that there will be a
lot written) will be written in C rather than Fortran or C++.
Taking advantage of C type checking seems like a good thing.

-Ian

-- 
Ian E. Stockdale	MRJ Technology Solutions, NASA Ames Research Center
ies@nas.nasa.gov	(415) 604-4628