Changeset 28316 in vbox for trunk/src/VBox/Main/VirtualBoxErrorInfoImpl.cpp
- Timestamp:
- Apr 14, 2010 6:01:39 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 60075
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/VirtualBoxErrorInfoImpl.cpp
r25149 r28316 82 82 } 83 83 84 #if !defined 84 #if !defined(VBOX_WITH_XPCOM) 85 85 86 86 /** … … 141 141 } 142 142 143 #else // !defined(VBOX_WITH_XPCOM)143 #else // defined(VBOX_WITH_XPCOM) 144 144 145 145 /** … … 147 147 * object. 148 148 */ 149 HRESULT VirtualBoxErrorInfo::init 149 HRESULT VirtualBoxErrorInfo::init(nsIException *aInfo) 150 150 { 151 151 AssertReturn(aInfo, E_FAIL); … … 157 157 * corresponding fields will simply remain null in this case). */ 158 158 159 rc = aInfo->GetResult (&mResultCode); 160 AssertComRC (rc); 161 Utf8Str message; 162 rc = aInfo->GetMessage(message.asOutParam()); 163 message.jolt(); 164 AssertComRC (rc); 165 mText = message; 159 rc = aInfo->GetResult(&mResultCode); 160 AssertComRC(rc); 161 162 char *pszMsg; /* No Utf8Str.asOutParam, different allocator! */ 163 rc = aInfo->GetMessage(&pszMsg); 164 AssertComRC(rc); 165 if (NS_SUCCEEDED(rc)) 166 { 167 mText = Bstr(pszMsg); 168 nsMemory::Free(pszMsg); 169 } 170 else 171 mText.setNull(); 166 172 167 173 return S_OK; … … 247 253 nsIException, IVirtualBoxErrorInfo) 248 254 249 #endif // !defined(VBOX_WITH_XPCOM)255 #endif // defined(VBOX_WITH_XPCOM) 250 256 /* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note:
See TracChangeset
for help on using the changeset viewer.