1 -- Created on: 1992-05-18
2 -- Created by: Stephan GARNAUD (ARM)
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
19 ---Purpose: Accurate management of OSD specific errors.
21 -- Each method can be error tested with object.Failed().
22 -- To manage an occuring error, just use object.Perror();
24 -- It is possible to reset the error counter to zero.
25 -- To do this use the 'Reset' method .
28 -- Only 4 methods are usable for programmer :
29 -- Failed to see whether an error occured or not.
30 -- Value to get system independent error code.
31 -- (See annexe for a complete list of error code).
32 -- Reset to reset error code to zero (no error).
33 -- Perror to raise OSDError and print a self explanatory error
34 -- message. This message says why an error occurs and
35 -- explains what to do to correct it.
38 WhoAmI, AsciiString from TCollection
45 ---Purpose: Initializes Error to be without any Error.
46 -- This is only used by OSD, not by programmer.
50 ---Purpose: Raises OSD_Error with accurate error message.
51 raises OSDError is static;
54 SetValue (me : in out; Errcode : Integer; From : Integer; Message : AsciiString) is static;
55 ---Purpose: Instantiates error
56 -- This is only used by OSD methods to instantiates an error code.
57 -- No description is done for the programmer.
60 Error (me) returns Integer is static;
61 ---Purpose: Returns an accurate error code.
62 -- To test these values, you must include "OSD_ErrorList.hxx"
66 Failed (me) returns Boolean is static;
67 ---Purpose: Returns TRUE if an error occurs
68 -- This is a way to test if a system call succeeded or not.
71 Reset (me : in out) is static;
72 ---Purpose: Resets error counter to zero
73 -- This allows the user to ignore an error (WARNING).
77 myMessage : AsciiString; -- Internal error message
78 myErrno : Integer; -- UNIX/VMS error used by OSD only
79 myCode : WhoAmI; -- Accuracy code in error for OSD only
80 extCode : Integer; -- Error type decoded for user