[ZOOM] Error Reporting (Was: some questions on the spec)

Mike Taylor mike at tecc.co.uk
Fri Jul 12 15:03:18 CEST 2002


What, no responses at all?  No-one cares except me?  :-@

Let me ask the two questions about error-reporting again, in the
following very short message than _no-one_ could be too busy to read.
Feedbackm, please!

--

The real problem here is that some languages support exceptions
(Python), some rely heavily on them (Java), some _kind of_ support
them but you never really know (C++) and some have no such concept (C,
unless you count longjmp).  So it's hard to say anything very
concrete.

At the moment, I am drifting towards the idea that ZOOM should express
error reporting in terms of exception objects, and leave unexeptional
languages to "fake" it as best they can -- just as C, a non-OO
language, has to take ZOOM's classes and objects.

I AM INTERESTED IN EVERYONE'S THOUGHTS ABOUT WHETHER THIS IS THE RIGHT
WAY TO GO.

--

I propose that v1.2 of the AAPI (when finished) should specify a
Exception object, and say that all exceptions thrown must be of that
type (including its subtypes).  The Exception class would include two
methods -- Error Code and Error String (the latter a human-readable
representation of the former), and subclasses such as BIB-1 Exception
would include extra methods such as Additional Information.  Bindings
and implementations would be free to add their own Exception
subclasses so long as they supported at least the Error Code and Error
String methods.

AGAIN, I AM INTERESTED IN EVERYONE'S THOUGHTS ABOUT WHETHER THIS IS
THE RIGHT WAY TO GO.

 _/|_	 _______________________________________________________________
/o ) \/  Mike Taylor   <mike at miketaylor.org.uk>   www.miketaylor.org.uk
)_v__/\  "Wagner's music is nowhere near as bad as it sounds" --
	 Mark Twain.





More information about the ZOOM mailing list