diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-06-22 19:06:48 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-06-24 20:23:44 +1000 |
| commit | 7fc25bc32547277c38bbedceb39c454843af8aac (patch) | |
| tree | ddc28b69bc4d39a15fd788069a5d8a0f903a0ad4 /src/dutil/eseutil.cpp | |
| parent | 57536725e6061c7f6cd0f532c07beca7cd1228c9 (diff) | |
| download | wix-7fc25bc32547277c38bbedceb39c454843af8aac.tar.gz wix-7fc25bc32547277c38bbedceb39c454843af8aac.tar.bz2 wix-7fc25bc32547277c38bbedceb39c454843af8aac.zip | |
Replace ExitTrace with new DUTIL_CALLBACK_TRACEERROR callback.
This allows capturing internal dutil errors and eventually supports filtering to certain parts of dutil.
Add Exit...Source macros to simplify calling both TraceError/TraceErrorDebug and Dutil_TraceErrorSource.
Make existing Exit macros call the new Exit...Source macros so the logic is in one place.
Diffstat (limited to 'src/dutil/eseutil.cpp')
| -rw-r--r-- | src/dutil/eseutil.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dutil/eseutil.cpp b/src/dutil/eseutil.cpp index 1ff8e82c..599a3943 100644 --- a/src/dutil/eseutil.cpp +++ b/src/dutil/eseutil.cpp | |||
| @@ -85,13 +85,13 @@ HRESULT HresultFromJetError(JET_ERR jEr) | |||
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | // Log the actual Jet error code so we have record of it before it's morphed into an HRESULT to be compatible with the rest of our code | 87 | // Log the actual Jet error code so we have record of it before it's morphed into an HRESULT to be compatible with the rest of our code |
| 88 | ExitTrace(hr, "Encountered Jet Error: 0x%08x", jEr); | 88 | ExitTraceSource(DUTIL_SOURCE_DEFAULT, hr, "Encountered Jet Error: 0x%08x", jEr); |
| 89 | 89 | ||
| 90 | return hr; | 90 | return hr; |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | #define ExitOnJetFailure(e, x, s, ...) { x = HresultFromJetError(e); if (S_OK != x) { ExitTrace(x, s, __VA_ARGS__); goto LExit; }} | 93 | #define ExitOnJetFailure(e, x, s, ...) { x = HresultFromJetError(e); if (S_OK != x) { ExitTraceSource(DUTIL_SOURCE_DEFAULT, x, s, __VA_ARGS__); goto LExit; }} |
| 94 | #define ExitOnRootJetFailure(e, x, s, ...) { x = HresultFromJetError(e); if (S_OK != x) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }} | 94 | #define ExitOnRootJetFailure(e, x, s, ...) { x = HresultFromJetError(e); if (S_OK != x) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTraceSource(DUTIL_SOURCE_DEFAULT, x, s, __VA_ARGS__); goto LExit; }} |
| 95 | 95 | ||
| 96 | HRESULT DAPI EseBeginSession( | 96 | HRESULT DAPI EseBeginSession( |
| 97 | __out JET_INSTANCE *pjiInstance, | 97 | __out JET_INSTANCE *pjiInstance, |
