You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: