From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,319ef0454c7765d5 X-Google-Attributes: gid103376,public From: Mats.Weber@matrix.ch (Mats Weber) Subject: Re: Why no exception hierarchy ? Date: 1995/03/31 Message-ID: #1/1 X-Deja-AN: 100649459 sender: usenet@eunet.ch references: <3ksv4s$f9e@news.uni-c.dk> <3l1mgn$ppb@gnat.cs.nyu.edu> organization: ELCA Matrix SA newsgroups: comp.lang.ada Date: 1995-03-31T00:00:00+00:00 List-Id: In article <3l1mgn$ppb@gnat.cs.nyu.edu>, dewar@cs.nyu.edu (Robert Dewar) wrote: > For example, in one early version of the Posix interface, every error > condition was mapped into a separate exception, but it becamse clear that > it is much better to have a single exception with an error code. And how are tasks dealt with ? I guess the error code given by the last exception is returned by a global function or variable (like UNIX's errno), but that mechanism doesn't work in a multitasking environment. This is why I like Modula-3's parameterized exceptions. Combined with inheritance, they are as powerful as exception hierarchies, but simpler to specify.