WG15 Defect Report Ref: 14519-06
Topic: Can implementation errors raise POSIX_ERROR?

This is an approved interpretation of 14519:1994.


Last update: 1997-05-20

                                                                14519-92 #6

Class: No change


	Topic:			Can implementation errors raise POSIX_ERROR?
	Relevant Sections:	ISO/IEC 14519:1994:  section 2.4.4

Defect Report:

The standard is not clear on whether an implementation may raise
POSIX_ERROR for implementation-defined and detected error conditions.

WG15 response for 9945-1:1990 (9945-1:1990):

Implementations may raise POSIX_Error for implementation-defined error

Implementations may return implementation-defined values of type
Error_Code.  However, an implementation-defined value must not
conflict with a POSIX-defined value.  The implementation-defined
values of type Error_Code may not defined in package POSIX; they must
be defined in an implementation-specific package.  The function
POSIX.Image on Error_Code should return the constant named defined in
the implementation-defined package.

Rationale for Interpretation:

This is the intent, and is the reason why the type Error_Code is
defined to permit implementation extensions, as documented in the
rationale.   For instance, if the implementation wishes to add a new
error condition "Kernel_Is_Trashed", it should define
a package akin to the following:

     with POSIX;
     package Implementation_Errors is

         Kernel_Is_Trashed : constant POSIX.Error_Code
     	   	 	       	            := 42; 
     	   -- value must not conflict with values in package POSIX

     end Implementation_Errors;

The function POSIX.Image (Implementation_Errors.Kernel_Is_Trashed)
should return the string "Kernel_Is_Trashed" (and not 

Note that a nice feature of Ada9X will be that the
implementation-defined error codes can be defined in a child package
of package POSIX.  However, this is not supported by Ada83, and this
is an Ada83 binding.