Changeset 8709 in vbox for trunk/src/VBox/Main/include/VirtualBoxBase.h
- Timestamp:
- May 8, 2008 1:43:21 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30647
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/VirtualBoxBase.h
r8688 r8709 1105 1105 static HRESULT setErrorInternal (HRESULT aResultCode, const GUID &aIID, 1106 1106 const Bstr &aComponent, const Bstr &aText, 1107 bool aWarning );1107 bool aWarning, bool aLogIt); 1108 1108 1109 1109 protected: … … 1233 1233 1234 1234 static HRESULT setError (HRESULT aResultCode, const GUID &aIID, 1235 const Bstr &aComponent, 1236 const Bstr &aText) 1235 const Bstr &aComponent, 1236 const Bstr &aText, 1237 bool aLogIt = true) 1237 1238 { 1238 1239 return setErrorInternal (aResultCode, aIID, aComponent, aText, 1239 false /* aWarning */ );1240 false /* aWarning */, aLogIt); 1240 1241 } 1241 1242 … … 1245 1246 { 1246 1247 return setErrorInternal (aResultCode, aIID, aComponent, aText, 1247 true /* aWarning */ );1248 true /* aWarning */, true /* aLogIt */); 1248 1249 } 1249 1250 1250 1251 static HRESULT setError (HRESULT aResultCode, const GUID &aIID, 1251 1252 const Bstr &aComponent, 1252 const char *aText, va_list aArgs )1253 const char *aText, va_list aArgs, bool aLogIt = true) 1253 1254 { 1254 1255 return setErrorInternal (aResultCode, aIID, aComponent, 1255 1256 Utf8StrFmtVA (aText, aArgs), 1256 false /* aWarning */ );1257 false /* aWarning */, aLogIt); 1257 1258 } 1258 1259 … … 1263 1264 return setErrorInternal (aResultCode, aIID, aComponent, 1264 1265 Utf8StrFmtVA (aText, aArgs), 1265 true /* aWarning */ );1266 true /* aWarning */, true /* aLogIt */); 1266 1267 } 1267 1268 }; … … 1382 1383 va_start (args, aText); 1383 1384 HRESULT rc = VirtualBoxSupportErrorInfoImplBase::setError 1384 (aResultCode, aIID, aComponent, aText, args );1385 (aResultCode, aIID, aComponent, aText, args, true /* aLogIt */); 1385 1386 va_end (args); 1386 1387 return rc; … … 1436 1437 va_start (args, aText); 1437 1438 HRESULT rc = VirtualBoxSupportErrorInfoImplBase::setError 1438 (aResultCode, COM_IIDOF(I), C::getComponentName(), aText, args );1439 (aResultCode, COM_IIDOF(I), C::getComponentName(), aText, args, true /* aLogIt */); 1439 1440 va_end (args); 1440 1441 return rc; … … 1473 1474 { 1474 1475 HRESULT rc = VirtualBoxSupportErrorInfoImplBase::setError 1475 (aResultCode, COM_IIDOF(I), C::getComponentName(), aText, aArgs );1476 (aResultCode, COM_IIDOF(I), C::getComponentName(), aText, aArgs, true /* aLogIt */); 1476 1477 return rc; 1477 1478 } … … 1509 1510 { 1510 1511 HRESULT rc = VirtualBoxSupportErrorInfoImplBase::setError 1511 (aResultCode, COM_IIDOF(I), C::getComponentName(), aText );1512 (aResultCode, COM_IIDOF(I), C::getComponentName(), aText, true /* aLogIt */); 1512 1513 return rc; 1513 1514 } … … 1544 1545 va_start (args, aText); 1545 1546 HRESULT rc = VirtualBoxSupportErrorInfoImplBase::setError 1546 (aResultCode, aIID, C::getComponentName(), aText, args );1547 (aResultCode, aIID, C::getComponentName(), aText, args, true /* aLogIt */); 1547 1548 va_end (args); 1548 1549 return rc; … … 1565 1566 HRESULT rc = VirtualBoxSupportErrorInfoImplBase::setWarning 1566 1567 (aResultCode, aIID, C::getComponentName(), aText, args); 1568 va_end (args); 1569 return rc; 1570 } 1571 1572 /** 1573 * Sets the error information for the current thread but doesn't put 1574 * anything in the release log. This is very useful for avoiding 1575 * harmless error from causing confusion. 1576 * 1577 * It is otherwise identical to #setError (HRESULT, const char *text, ...). 1578 */ 1579 static HRESULT setErrorNoLog (HRESULT aResultCode, const char *aText, ...) 1580 { 1581 va_list args; 1582 va_start (args, aText); 1583 HRESULT rc = VirtualBoxSupportErrorInfoImplBase::setError 1584 (aResultCode, COM_IIDOF(I), C::getComponentName(), aText, args, false /* aLogIt */); 1567 1585 va_end (args); 1568 1586 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.