1------------------------------------------------------------------------------
2--                                                                          --
3--                   ASIS-for-GNAT INTERFACE COMPONENTS                     --
4--                                                                          --
5--                          A S I S . E R R O R S                           --
6--                                                                          --
7--                                 S p e c                                  --
8--                                                                          --
9-- This   specification  is  adapted   from  the  Ada   Semantic  Interface --
10-- Specification Standard (ISO/IEC 15291) for use with GNAT.  In accordance --
11-- with the copyright of that document, you can freely copy and modify this --
12-- specification, provided that if you redistribute a modified version, any --
13-- changes that you have made are clearly indicated.                        --
14--                                                                          --
15------------------------------------------------------------------------------
16
17------------------------------------------------------------------------------
18--  4  package Asis.Errors
19------------------------------------------------------------------------------
20------------------------------------------------------------------------------
21
22pragma Warnings (Off);
23--  To disable the warning on redeclaration of an entity from Standard
24
25package Asis.Errors is
26------------------------------------------------------------------------------
27------------------------------------------------------------------------------
28--
29--  ASIS reports all operational errors by raising an exception.  Whenever an
30--  ASIS implementation raises one of the exceptions declared in package
31--  Asis.Exceptions, it will previously have set the values returned by the
32--  Status and Diagnosis queries to indicate the cause of the error.  The
33--  possible values for Status are indicated in the definition of Error_Kinds
34--  below, with suggestions for the associated contents of the Diagnosis
35--  string as a comment.
36--
37--  The Diagnosis and Status queries are provided in the Asis.Implementation
38--  package to supply more information about the reasons for raising any
39--  exception.
40--
41--  ASIS applications are encouraged to follow this same convention whenever
42--  they explicitly raise any ASIS exception--always record a Status and
43--  Diagnosis prior to raising the exception.
44------------------------------------------------------------------------------
45--  4.1   type Error_Kinds
46------------------------------------------------------------------------------
47--  This enumeration type describes the various kinds of errors.
48--
49
50   type Error_Kinds is (
51
52      Not_An_Error,               -- No error is presently recorded
53      Value_Error,                -- Routine argument value invalid
54      Initialization_Error,       -- ASIS is uninitialized
55      Environment_Error,          -- ASIS could not initialize
56      Parameter_Error,            -- Bad Parameter given to Initialize
57      Capacity_Error,             -- Implementation overloaded
58      Name_Error,                 -- Context/unit not found
59      Use_Error,                  -- Context/unit not use/open-able
60      Data_Error,                 -- Context/unit bad/invalid/corrupt
61      Text_Error,                 -- The program text cannot be located
62      Storage_Error,              -- Storage_Error suppressed
63      Obsolete_Reference_Error,   -- Argument or result is invalid due to
64      --                             and inconsistent compilation unit
65      Unhandled_Exception_Error,  -- Unexpected exception suppressed
66      Not_Implemented_Error,      -- Functionality not implemented
67      Internal_Error);            -- Implementation internal failure
68
69end Asis.Errors;
70