Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,12 @@ public void handleException(Throwable t, AgentSpan span) {
Throwable throwable;
int chainedExceptionIdx = 0;
while ((throwable = chainedExceptions.pollFirst()) != null) {
StackTraceElement[] stackTrace = throwable.getStackTrace();
if (stackTrace == null || stackTrace.length == 0) {
continue;
}
ExceptionProbeManager.CreationResult creationResult =
exceptionProbeManager.createProbesForException(
throwable.getStackTrace(), chainedExceptionIdx);
exceptionProbeManager.createProbesForException(stackTrace, chainedExceptionIdx);
if (creationResult.probesCreated > 0) {
if (!applyConfigAsync) {
applyExceptionConfiguration(fingerprint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ protected boolean shouldHandleException(Throwable t, AgentSpan span) {
}
// do not handle exception with no stacktrace. cannot capture anything for it.
// includes also FastThrow ones
if (t.getStackTrace().length == 0) {
StackTraceElement[] stackTrace = t.getStackTrace();
if (stackTrace == null || stackTrace.length == 0) {
return false;
}
return circuitBreaker.trip();
Expand Down