- Timestamp:
- Feb 9, 2009 12:07:53 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/errorprint2.h
r16556 r16580 39 39 // compiled only once for all front-ends 40 40 void GluePrintErrorInfo(com::ErrorInfo &info); 41 void GluePrintErrorContext(const char *pcszContext, const char *pcszSourceFile, uint32_t ulLine); 41 42 void GluePrintRCMessage(HRESULT rc); 42 43 void GlueHandleComError(ComPtr<IUnknown> iface, const char *pcszContext, HRESULT rc, const char *pcszSourceFile, uint32_t ulLine); -
trunk/src/VBox/Main/glue/errorprint2.cpp
r16555 r16580 50 50 } 51 51 52 void GluePrintErrorContext(const char *pcszContext, const char *pcszSourceFile, uint32_t ulLine) 53 { 54 // pcszSourceFile comes from __FILE__ macro, which always contains the full path, 55 // which we don't want to see printed: 56 Utf8Str strFilename(RTPathFilename(pcszSourceFile)); 57 Utf8Str str = Utf8StrFmt("Context: \"%s\" at line %d of file %s\n", 58 pcszContext, 59 ulLine, 60 strFilename.c_str()); 61 // print and log 62 RTPrintf("%s", str.c_str()); 63 Log(("%s", str.c_str())); 64 } 65 52 66 void GluePrintRCMessage(HRESULT rc) 53 67 { … … 67 81 com::ErrorInfo info(iface); 68 82 if (info.isFullAvailable() || info.isBasicAvailable()) 69 {70 83 GluePrintErrorInfo(info); 71 72 // pcszSourceFile comes from __FILE__ macro, which always contains the full path, 73 // which we don't want to see printed: 74 Utf8Str strFilename(RTPathFilename(pcszSourceFile)); 75 Utf8Str str = Utf8StrFmt("Context: \"%s\" at line %d of file %s\n", 76 pcszContext, 77 ulLine, 78 strFilename.c_str()); 79 // print and log 80 RTPrintf("%s", str.c_str()); 81 Log(("%s", str.c_str())); 82 } 84 GluePrintErrorContext(pcszContext, pcszSourceFile, ulLine); 83 85 } 84 86
Note:
See TracChangeset
for help on using the changeset viewer.