3 karl 1.3 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
13 kumpf 1.1 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
20 //
21 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 // Author: Carol Ann Krug Graves, Hewlett-Packard Company
33 // (carolann_graves@hp.com)
34 kumpf 1.1 //
35 // Modified By: Sushma Fernandes, Hewlett-Packard Company
36 // (sushma_fernandes@hp.com)
37 //
38 //%/////////////////////////////////////////////////////////////////////////////
39
40 #ifndef Pegasus_OSInfoException_h
41 #define Pegasus_OSInfoException_h
42
43 #include <Clients/cliutils/CommandException.h>
44
45 PEGASUS_NAMESPACE_BEGIN
46
47 /**
48
49 OSInfoException signals that an exception has occurred in executing the
50 osinfo command.
51
52 @author Hewlett-Packard Company
53
54 */
55 kumpf 1.1 class OSInfoException : public CommandException
56 {
57 public:
58 /**
59
60 Constructs an OSInfoException with a message corresponding to the
61 specified exception ID.
62
63 @param ID the integer exception identifier
64
65 */
66 OSInfoException (Uint32 ID);
67
68 /**
69
70 Constructs an OSInfoException with a message corresponding to the
71 specified ID, appended with the specified String.
72
73 @param ID the integer exception identifier
74 @param appendString the string to append to the exception message
75
76 kumpf 1.1 */
77 OSInfoException (Uint32 ID, const String& appendString);
78
79 /**
80
81 Constructs an OSInfoException with the specified message.
82
83 @param exceptionMessage a string containing the exception message
84
85 */
86 OSInfoException (const String& exceptionMessage);
87
88 //
89 // Exception identifiers
90 //
91 // These are used to index into the messageStrings array to retrieve the
92 // appropriate exception message string. When a new identifier is added,
93 // the messageStrings array and MAX_ID must be updated appropriately.
94 //
95
96 /**
97 kumpf 1.1
98 Default exception identifier. This identifier is used if the specified
99 identifier is out of range. This identifier corresponds to a default
100 (generic) message in the array of exception message strings.
101
102 */
103 static const Uint32 DEFAULT_ID;
104
105 /**
106
107 Minimum valid exception identifier.
108
109 */
110 static const Uint32 MIN_ID;
111
112 /**
113
114 Exception identifier indicating a connection failure.
115
116 */
117
118 kumpf 1.1 static const Uint32 CONNECT_FAIL;
119
120 /**
121
122 Exception identifier indicating timed out waiting for response.
123
124 */
125 static const Uint32 TIMED_OUT;
126
127 /**
128
129 Exception identifier indicating invalid input.
130
131 */
132 static const Uint32 INVALID_INPUT;
133
134 /**
135
136 Maximum valid exception identifier. This value must be updated when
137 a new exception identifier and message are added.
138
139 kumpf 1.1 */
140 static const Uint32 MAX_ID;
141
142 private:
143 /**
144
145 Exception message strings. The exception identifier is used as an
146 index into this array to retrieve the appropriate exception message
147 string. When a new identifier is added, this array must be updated
148 appropriately.
149
150 */
151 static const char* _messageStrings [];
152 };
153
154 PEGASUS_NAMESPACE_END
155
156 #endif /* Pegasus_OSInfoException_h */
|