Skip to content

Commit

Permalink
HPCC-31347 JLog trace export catch all Iexceptions
Browse files Browse the repository at this point in the history
- Catches all IExceptions thrown in noexcept function
- Logs issue
- Releases exception
- Reports export failure if exception caught

Signed-off-by: Rodrigo Pastrana <[email protected]>
  • Loading branch information
rpastrana committed Mar 1, 2024
1 parent 2b8925b commit 21bf908
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion system/jlib/jtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,10 @@ class JLogSpanExporter final : public opentelemetry::sdk::trace::SpanExporter
}
return opentelemetry::sdk::common::ExportResult::kSuccess;
}
catch(...) //Interface does not allow throwing exceptions
catch (IException * e)
{
EXCLOG(e, "JLogSpanExporter::Export");
e->Release();
return opentelemetry::sdk::common::ExportResult::kFailure;
}
}
Expand Down

0 comments on commit 21bf908

Please sign in to comment.