From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 16 Sep 93 14:28:00 GMT From: emery@mitre-bedford.arpa (David Emery) Subject: Re: Comparison of Ada and C++ exceptions? Message-ID: List-Id: 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 ; 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 := ; BAD_FILE_DESCRIPTOR : constant ERROR_CODE := ; --- 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