1 martin 1.20 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.21 //
|
3 martin 1.20 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.21 //
|
10 martin 1.20 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.21 //
|
17 martin 1.20 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.21 //
|
20 martin 1.20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.21 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.20 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.21 //
|
28 martin 1.20 //////////////////////////////////////////////////////////////////////////
|
29 kumpf 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
|
32 kumpf 1.6 #ifndef Pegasus_ClientException_h
33 #define Pegasus_ClientException_h
|
34 kumpf 1.1
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/String.h>
|
37 kumpf 1.4 #include <Pegasus/Common/Exception.h>
|
38 kumpf 1.1 #include <Pegasus/Client/Linkage.h>
39
40 PEGASUS_NAMESPACE_BEGIN
41
42 /**
43 An exception of this type indicates that the HTTP response from the CIM
44 Server was improperly formed.
45 */
46 class PEGASUS_CLIENT_LINKAGE CIMClientMalformedHTTPException
|
47 kumpf 1.5 : public Exception
|
48 kumpf 1.1 {
49 public:
|
50 kumpf 1.19 /**
51 Constructs a CIMClientMalformedHTTPException with a specified message.
52 @param message The exception message
53 */
|
54 kumpf 1.1 CIMClientMalformedHTTPException(const String& message);
55 };
56
57 /**
58 An exception of this type indicates that an HTTP error response was sent
59 by the CIM Server.
60 */
|
61 kumpf 1.8 class PEGASUS_CLIENT_LINKAGE CIMClientHTTPErrorException : public Exception
|
62 kumpf 1.1 {
63 public:
|
64 kumpf 1.19 /**
65 Constructs a CIMClientHTTPErrorException with specified error details.
66 @param httpStatusCode The HTTP status code in the response
67 @param reasonPhrase The HTTP reason phrase in the response
68 @param cimError The CIMError header value in the HTTP response
69 @param cimErrorDetail Additional error detail information, if available
70 */
|
71 kumpf 1.8 CIMClientHTTPErrorException(
|
72 kumpf 1.1 Uint32 httpStatusCode,
|
73 kumpf 1.13 const String& reasonPhrase,
74 const String& cimError,
75 const String& cimErrorDetail);
|
76 kumpf 1.19
77 /**
78 Constructs a CIMClientHTTPErrorException with specified error details.
79 @param httpStatusCode The HTTP status code in the response
80 @param cimError The CIMError header value in the HTTP response
81 @param cimErrorDetail Additional error detail information, if available
82 */
|
83 kumpf 1.13 CIMClientHTTPErrorException(
84 Uint32 httpStatusCode,
|
85 kumpf 1.7 const String& cimError,
|
86 kumpf 1.10 const String& cimErrorDetail);
|
87 kumpf 1.19
88 /**
89 Constructs a copy of an CIMClientHTTPErrorException.
90 @param httpError The object to copy
91 */
|
92 kumpf 1.8 CIMClientHTTPErrorException(const CIMClientHTTPErrorException& httpError);
|
93 kumpf 1.19
94 /**
95 Destructs an CIMClientHTTPErrorException.
96 */
|
97 kumpf 1.9 virtual ~CIMClientHTTPErrorException();
|
98 kumpf 1.1
|
99 kumpf 1.19 /**
100 Copies an CIMClientHTTPErrorException.
101 @param httpError The object to copy
102 */
|
103 kumpf 1.18 CIMClientHTTPErrorException& operator=(
104 const CIMClientHTTPErrorException& httpError);
105
|
106 kumpf 1.19 /**
107 Gets the HTTP status code from the error response.
108 @return An integer HTTP status code
109 */
|
110 kumpf 1.1 Uint32 getCode() const;
|
111 kumpf 1.19
112 /**
113 Gets the CIMError header value from the HTTP error response.
114 @return A String containing the CIMError header value
115 */
|
116 kumpf 1.1 String getCIMError() const;
|
117 kumpf 1.19
118 /**
119 Gets additional error detail information from the HTTP error response.
120 @return A String containing additional error detail information from
121 the HTTP error response, if available. Otherwise, an empty String
122 is returned.
123 */
|
124 kumpf 1.10 String getCIMErrorDetail() const;
|
125 kumpf 1.1 };
126
127 /**
128 An exception of this type indicates that the CIM response sent by the
129 CIM Server could not be decoded from XML.
130 */
|
131 kumpf 1.5 class PEGASUS_CLIENT_LINKAGE CIMClientXmlException : public Exception
|
132 kumpf 1.1 {
133 public:
|
134 kumpf 1.19 /**
135 Constructs a CIMClientXmlException with a specified message.
136 @param message The exception message
137 */
|
138 kumpf 1.1 CIMClientXmlException(const String& message);
139 };
140
141 /**
142 An exception of this type indicates that the CIM response sent by the
143 CIM Server contained unexpected data.
144 */
145 class PEGASUS_CLIENT_LINKAGE CIMClientResponseException
|
146 kumpf 1.5 : public Exception
|
147 kumpf 1.1 {
148 public:
|
149 kumpf 1.19 /**
150 Constructs a CIMClientResponseException with a specified message.
151 @param message The exception message
152 */
|
153 kumpf 1.1 CIMClientResponseException(const String& message);
154 };
155
156 PEGASUS_NAMESPACE_END
157
|
158 kumpf 1.6 #endif /* Pegasus_ClientException_h */
|