Changeset 8709
- Timestamp:
- 05/08/08 15:43:21 (2 months ago)
- Files:
-
- trunk/src/VBox/Main/Makefile.kmk (modified) (1 diff)
- trunk/src/VBox/Main/VirtualBoxBase.cpp (modified) (1 diff)
- trunk/src/VBox/Main/include/USBDeviceImpl.h (modified) (2 diffs)
- trunk/src/VBox/Main/include/VirtualBoxBase.h (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/VBox/Main/Makefile.kmk
r8699 r8709 48 48 VBOX_MAIN_DEFS += VBOX_WITH_UNIXY_TAP_NETWORKING 49 49 endif 50 #if1of ($(KBUILD_TARGET), linux freebsd solaris)51 #VBOX_MAIN_DEFS += VBOX_MAIN_USE_SEMRW52 #else50 if1of ($(KBUILD_TARGET), linux freebsd solaris) 51 VBOX_MAIN_DEFS += VBOX_MAIN_USE_SEMRW 52 else 53 53 ifneq ($(VBOX_VERSION_MAJOR)$(VBOX_VERSION_MINOR)$(VBOX_VERSION_BUILD),160) 54 54 VBOX_MAIN_DEFS += VBOX_MAIN_AUTOLOCK_TRAP 55 55 endif 56 #endif56 endif 57 57 58 58 ## @todo eliminate or expand VBOX_MAIN_DEFS. trunk/src/VBox/Main/VirtualBoxBase.cpp
r8683 r8709 609 609 HRESULT aResultCode, const GUID &aIID, 610 610 const Bstr &aComponent, const Bstr &aText, 611 bool aWarning )611 bool aWarning, bool aLogIt) 612 612 { 613 613 /* whether multi-error mode is turned on */ 614 614 bool preserve = ((uintptr_t) RTTlsGet (MultiResult::sCounter)) > 0; 615 615 616 LogRel (("ERROR [COM]: aRC=%Rhrc (%#08x) aIID={%RTuuid} aComponent={%ls} aText={%ls} " 617 "aWarning=%RTbool, preserve=%RTbool\n", 618 aResultCode, aResultCode, &aIID, aComponent.raw(), aText.raw(), aWarning, 619 preserve)); 616 if (aLogIt) 617 LogRel (("ERROR [COM]: aRC=%Rhrc (%#08x) aIID={%RTuuid} aComponent={%ls} aText={%ls} " 618 "aWarning=%RTbool, preserve=%RTbool\n", 619 aResultCode, aResultCode, &aIID, aComponent.raw(), aText.raw(), aWarning, 620 preserve)); 620 621 621 622 /* these are mandatory, others -- not */ trunk/src/VBox/Main/include/USBDeviceImpl.h
r8701 r8709 130 130 if (!found) 131 131 { 132 return setError (E_INVALIDARG, OUSBDeviceCollection::tr (132 return setErrorNoLog (E_INVALIDARG, OUSBDeviceCollection::tr ( 133 133 "Could not find a USB device with UUID {%s}"), 134 134 idToFind.toString().raw()); … … 158 158 159 159 if (!found) 160 return setError (E_INVALIDARG, OUSBDeviceCollection::tr (160 return setErrorNoLog (E_INVALIDARG, OUSBDeviceCollection::tr ( 161 161 "Could not find a USB device with address '%ls'"), 162 162 aAddress); 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;

