Skip to content

Commit df12bec

Browse files
committed
ExceptionHandlers: Fix code in bytecode comment
1 parent b436de8 commit df12bec

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/bytebuddy/ExceptionHandlers.java

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,14 @@ public Size apply(final MethodVisitor mv, final Implementation.Context context)
3939
final boolean exitOnFailure = InstrumenterConfig.get().isInternalExitOnFailure();
4040
final String logMethod = exitOnFailure ? "error" : "debug";
4141

42-
// Writes the following bytecode if exitOnFailure is false:
42+
// Writes the following bytecode (note that two statements are conditionally written):
4343
//
44-
// BlockingExceptionHandler.rethrowIfBlockingException(t);
45-
// try {
46-
// InstrumentationErrors.incrementErrorCount();
47-
// org.slf4j.LoggerFactory.getLogger((Class)ExceptionLogger.class)
48-
// .debug("Failed to handle exception in instrumentation for ...", t);
49-
// } catch (Throwable t2) {
50-
// }
51-
//
52-
// And the following bytecode if exitOnFailure is true:
53-
//
54-
// BlockingExceptionHandler.rethrowIfBlockingException(t);
44+
// BlockingExceptionHandler.rethrowIfBlockingException(t); // when appSecEnabled=true
5545
// try {
5646
// InstrumentationErrors.incrementErrorCount();
5747
// org.slf4j.LoggerFactory.getLogger((Class)ExceptionLogger.class)
5848
// .error("Failed to handle exception in instrumentation for ...", t);
59-
// System.exit(1);
49+
// System.exit(1); // when exitOnFailure=true
6050
// } catch (Throwable t2) {
6151
// }
6252
//

0 commit comments

Comments
 (0)