File: asis-errors.ads

package info (click to toggle)
asis 2019-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 13,848 kB
  • sloc: ada: 156,772; makefile: 296; sh: 81; xml: 48; csh: 10
file content (69 lines) | stat: -rw-r--r-- 3,946 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
------------------------------------------------------------------------------
--                                                                          --
--                   ASIS-for-GNAT INTERFACE COMPONENTS                     --
--                                                                          --
--                          A S I S . E R R O R S                           --
--                                                                          --
--                                 S p e c                                  --
--                                                                          --
-- This   specification  is  adapted   from  the  Ada   Semantic  Interface --
-- Specification Standard (ISO/IEC 15291) for use with GNAT.  In accordance --
-- with the copyright of that document, you can freely copy and modify this --
-- specification, provided that if you redistribute a modified version, any --
-- changes that you have made are clearly indicated.                        --
--                                                                          --
------------------------------------------------------------------------------

------------------------------------------------------------------------------
--  4  package Asis.Errors
------------------------------------------------------------------------------
------------------------------------------------------------------------------

pragma Warnings (Off);
--  To disable the warning on redeclaration of an entity from Standard

package Asis.Errors is
------------------------------------------------------------------------------
------------------------------------------------------------------------------
--
--  ASIS reports all operational errors by raising an exception.  Whenever an
--  ASIS implementation raises one of the exceptions declared in package
--  Asis.Exceptions, it will previously have set the values returned by the
--  Status and Diagnosis queries to indicate the cause of the error.  The
--  possible values for Status are indicated in the definition of Error_Kinds
--  below, with suggestions for the associated contents of the Diagnosis
--  string as a comment.
--
--  The Diagnosis and Status queries are provided in the Asis.Implementation
--  package to supply more information about the reasons for raising any
--  exception.
--
--  ASIS applications are encouraged to follow this same convention whenever
--  they explicitly raise any ASIS exception--always record a Status and
--  Diagnosis prior to raising the exception.
------------------------------------------------------------------------------
--  4.1   type Error_Kinds
------------------------------------------------------------------------------
--  This enumeration type describes the various kinds of errors.
--

   type Error_Kinds is (

      Not_An_Error,               -- No error is presently recorded
      Value_Error,                -- Routine argument value invalid
      Initialization_Error,       -- ASIS is uninitialized
      Environment_Error,          -- ASIS could not initialize
      Parameter_Error,            -- Bad Parameter given to Initialize
      Capacity_Error,             -- Implementation overloaded
      Name_Error,                 -- Context/unit not found
      Use_Error,                  -- Context/unit not use/open-able
      Data_Error,                 -- Context/unit bad/invalid/corrupt
      Text_Error,                 -- The program text cannot be located
      Storage_Error,              -- Storage_Error suppressed
      Obsolete_Reference_Error,   -- Argument or result is invalid due to
      --                             and inconsistent compilation unit
      Unhandled_Exception_Error,  -- Unexpected exception suppressed
      Not_Implemented_Error,      -- Functionality not implemented
      Internal_Error);            -- Implementation internal failure

end Asis.Errors;