-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Since exception handling is not yet supported, we'd like a mean to handle cases where the file operations Create, Append, Open, Close fail. An idea is to have variants with a Result parameter. These variants can be useful too when exception handling is implemented, by the way.
Example for Create:
-- If the operation fails, one of the Name_Error, Use_Error, Status_Error exceptions is raised.
procedure Create (File : in out File_Type; Name : String);
procedure Create (File : in out File_Type; Name : VString);
-- Variants of Create, Append, Open, Close with a "Result" parameter.
-- If the operation fails, Result is set to the value corresponding to the exception.
type File_Operation_Result is (Success, Erroneous_Name, Erroneous_Use, Erroneous_Status);
procedure Create (File : in out File_Type; Name : String; Result: out File_Operation_Result);
procedure Create (File : in out File_Type; Name : VString; Result: out File_Operation_Result);
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request