Changeset 14922 in vbox for trunk/include
- Timestamp:
- Dec 2, 2008 5:39:34 PM (16 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/settings.h
r14917 r14922 794 794 Key key = findKey (aName); 795 795 if (key.isNull()) 796 throw ENoKey (FmtStr ("No such key '%s'", aName)); 796 { 797 throw ENoKey(FmtStr("No such key '%s'", aName)); 798 } 797 799 return key; 798 800 } … … 1015 1017 1016 1018 /** 1017 * The Error class represents errors that may happen when parsing or1018 * validating the XML document representing the settings tree.1019 */1020 class VBOXXML_CLASS Error : public xml::RuntimeError1021 {1022 public:1023 1024 Error (const char *aMsg = NULL) : RuntimeError (aMsg) {}1025 };1026 1027 /**1028 1019 * The EConversionCycle class represents a conversion cycle detected by the 1029 1020 * AutoConverter::needsConversion() implementation. 1030 1021 */ 1031 class VBOXXML_CLASS EConversionCycle : public Error1022 class VBOXXML_CLASS EConversionCycle : public xml::RuntimeError 1032 1023 { 1033 1024 public: 1034 1025 1035 EConversionCycle (const char *aMsg = NULL) : Error (aMsg) {}1026 EConversionCycle (const char *aMsg = NULL) : RuntimeError (aMsg) {} 1036 1027 }; 1037 1028 … … 1183 1174 private: 1184 1175 1185 class XmlError;1186 1187 1176 /* Obscure class data */ 1188 1177 struct Data; -
trunk/include/VBox/xml.h
r14904 r14922 110 110 public: 111 111 112 Error 112 Error(const char *aMsg = NULL) 113 113 : m (aMsg ? Str::New (aMsg) : NULL) {} 114 114 … … 120 120 121 121 private: 122 123 Error() {}; // hide the default constructor to make sure the extended one above is always used 122 124 123 125 /** smart string with support for reference counting */ … … 148 150 public: 149 151 150 LogicError (const char *aMsg = NULL) : Error (aMsg) {} 152 LogicError (const char *aMsg = NULL) 153 : xml::Error(aMsg) 154 {} 151 155 152 156 LogicError (RT_SRC_POS_DECL); … … 158 162 159 163 RuntimeError (const char *aMsg = NULL) : Error (aMsg) {} 164 }; 165 166 class VBOXXML_CLASS XmlError : public RuntimeError 167 { 168 public: 169 170 XmlError(xmlErrorPtr aErr); 171 172 static char *Format(xmlErrorPtr aErr); 160 173 }; 161 174 … … 194 207 public: 195 208 196 EIPRTFailure (const char *aMsg = NULL) : RuntimeError (aMsg) {} 197 198 EIPRTFailure (int aRC) : mRC (aRC) {} 209 EIPRTFailure (int aRC); 210 199 211 int rc() const { return mRC; } 200 212 201 213 private: 202 203 214 int mRC; 204 215 }; … … 466 477 std::auto_ptr<Data> m; 467 478 479 static int ReadCallback(void *aCtxt, char *aBuf, int aLen); 480 481 static int CloseCallback (void *aCtxt); 468 482 }; 469 483
Note:
See TracChangeset
for help on using the changeset viewer.