SummerOfServenteen commented on a change in pull request #2931: Support 
bootstrap class enhance and fix OOM by empty stack of exception.
URL: https://github.com/apache/skywalking/pull/2931#discussion_r296429451
 
 

 ##########
 File path: 
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/util/ThrowableTransformer.java
 ##########
 @@ -30,10 +32,12 @@
     public String convert2String(Throwable throwable, final int maxLength) {
         final StringBuilder stackMessage = new StringBuilder();
         Throwable causeException = throwable;
-        while (causeException != null) {
+
+        int depth = CAUSE_EXCEPTION_DEPTH;
+        while (causeException != null || depth == 0) {
             stackMessage.append(printExceptionInfo(causeException));
 
-            boolean overMaxLength = 
printStackElement(throwable.getStackTrace(), new AppendListener() {
+            boolean isLookDeeper = 
printStackElement(causeException.getStackTrace(), new AppendListener() {
 
 Review comment:
   maybe depth != 0

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to