From: emery@mitre-bedford.arpa (David Emery)
Subject: Re: Comparison of Ada and C++ exceptions?
Date: 16 Sep 93 14:28:00 GMT [thread overview]
Message-ID: <EMERY.93Sep16092800@goldfinger.mitre.org> (raw)
One version of the POSIX/Ada binding used separate exceptions for each
POSIX error condition. However, for the reasons Mats mentioned, this
was changed to a single exception (POSIX_ERROR) and a set of
operations to get the error code,
type ERROR_CODE is <implementation defined integer>;
function GET_ERROR_CODE return ERROR_CODE;
function IS_POSIX_ERROR (ERROR : ERROR_CODE) return BOOLEAN;
function IMAGE (ERROR : ERROR_CODE) return STRING;
NO_ERROR : constant ERROR_CODE := 0;
ARGUMENT_LIST_TOO_LONG : constant ERROR_CODE
:= <implementation defined static expression>;
BAD_FILE_DESCRIPTOR : constant ERROR_CODE
:= <implementation defined static expression>;
--- etc.
There is an additional requirement that the error code value be kept
on a per-task basis. See IEEE Std. 1003.5-1992 for more information,
particularly for a discussion on why the type ERROR_CODE is an integer
type rather than a private type or enumeration type.
Now, if we had 'execption parameters' or a similar mechanism, then we
could have attached the error code to the POSIX_ERROR exception. I
would have liked that very much, and that was a feature I was hoping
to get with 9X.
dave
next reply other threads:[~1993-09-16 14:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-09-16 14:28 David Emery [this message]
-- strict thread matches above, loose matches on Subject: below --
1993-09-19 21:39 Comparison of Ada and C++ exceptions? agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!d
1993-09-16 8:45 pipex!zaphod.crihan.fr!vishnu.jussieu.fr!univ-lyon1.fr!scsing.switch.ch!e
1993-09-16 6:20 Dag Bruck
1993-09-15 1:03 munnari.oz.au!bruce.cs.monash.edu.au!monu6!aggedor.rmit.OZ.AU!root
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox