diff options
| author | Patrick Ohly <patrick.ohly@intel.com> | 2010-01-04 17:35:11 +0100 |
|---|---|---|
| committer | Patrick Ohly <patrick.ohly@intel.com> | 2010-01-04 17:35:11 +0100 |
| commit | 769c80de32f0b2559635e479e05d1c2800574acd (patch) | |
| tree | 5dffec7f88e2c0e5692364b9c39f061935fb56b8 | |
| parent | 359d9f21346a599919e626c038c08b52bc2f2a5f (diff) | |
Android: fixed/added exception handling macrosandroid
These changes were necessary to get the code as compiled by the
autotools build rules compiled with the Android NDK wrappers.
| -rw-r--r-- | src/Transport_interfaces/engine/enginesessiondispatch.cpp | 6 | ||||
| -rw-r--r-- | src/sysync/dataconversion.cpp | 6 | ||||
| -rwxr-xr-x | src/sysync/syncagent.cpp | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Transport_interfaces/engine/enginesessiondispatch.cpp b/src/Transport_interfaces/engine/enginesessiondispatch.cpp index a11ed67..093b33d 100644 --- a/src/Transport_interfaces/engine/enginesessiondispatch.cpp +++ b/src/Transport_interfaces/engine/enginesessiondispatch.cpp @@ -177,15 +177,15 @@ Ret_t TEngineSessionDispatch::HandleDecodingException(TSyncSession *aSessionP, c #ifdef SYDEBUG // determine session name const char *sname = "<unknown>"; - try { + SYSYNC_TRY { if (aSessionP) { sname = aSessionP->getLocalSessionID(); } } - catch (...) { + SYSYNC_CATCH (...) sname = "<BAD aSessionP, caused exception>"; aSessionP=NULL; // prevent attempt to write to session's log - } + SYSYNC_ENDCATCH // determine routine name if (!aRoutine) aRoutine="<unspecified routine>"; // show details diff --git a/src/sysync/dataconversion.cpp b/src/sysync/dataconversion.cpp index a307f8f..421bf90 100644 --- a/src/sysync/dataconversion.cpp +++ b/src/sysync/dataconversion.cpp @@ -66,7 +66,7 @@ bool DataConversion(SessionH aSession, timecontext_t oldUserTimeContext = session->fUserTimeContext; session->fUserTimeContext = TCTX_UNKNOWN; - try { + SYSYNC_TRY { TRootConfig *config = session->getRootConfig(); TDatatypesConfig *types = config->fDatatypesConfigP; TDataTypeConfig *fromTypeConfig = types->getDataType(aFromTypeName); @@ -138,10 +138,10 @@ bool DataConversion(SessionH aSession, aItemData.assign(data, size); res = true; - } catch(...) { + } SYSYNC_CATCH (...) // TODO: error logging res = false; - } + SYSYNC_ENDCATCH done: if (smlitem) diff --git a/src/sysync/syncagent.cpp b/src/sysync/syncagent.cpp index 70aa03d..eaea059 100755 --- a/src/sysync/syncagent.cpp +++ b/src/sysync/syncagent.cpp @@ -2559,7 +2559,7 @@ bool TSyncAgent::syncHdrFailure(bool aTryAgain) // special special case: header failed to execute the second time DEBUGPRINTFX(DBG_ERROR,("Fatal internal problem, SyncHdr execution failed twice")); aTryAgain=false; // just to make sure - SYSYNC_THROW((TSyncException("SyncHdr fatal execution problem"))); + SYSYNC_THROW(TSyncException("SyncHdr fatal execution problem")); } return aTryAgain; #endif |
