diff --git a/common/thorhelper/thorsoapcall.cpp b/common/thorhelper/thorsoapcall.cpp index bee4d69b47d..2e9635fc886 100644 --- a/common/thorhelper/thorsoapcall.cpp +++ b/common/thorhelper/thorsoapcall.cpp @@ -2642,12 +2642,11 @@ class CWSCAsyncFor : implements IWSCAsyncFor, public CInterface, public CAsyncFo { // other roxie exception ... master->logctx.CTXLOG("Exiting: received Roxie exception"); + master->activitySpanScope->recordException(e, true, true); if (e->errorRow()) processException(url, e->errorRow(), e); else processException(url, inputRows, e); - - master->activitySpanScope->recordException(e, true, true); break; } } @@ -2657,10 +2656,10 @@ class CWSCAsyncFor : implements IWSCAsyncFor, public CInterface, public CAsyncFo persistentHandler->doneUsing(socket, false); if (master->timeLimitExceeded) { - processException(url, inputRows, e); VStringBuffer msg("%s exiting: time limit (%ums) exceeded", getWsCallTypeName(master->wscType), master->timeLimitMS); master->logctx.CTXLOG("%s", msg.str()); master->activitySpanScope->recordError(SpanError(msg.str(), e->errorCode(), true, true)); + processException(url, inputRows, e); break; }