jdaugherty commented on code in PR #15564:
URL: https://github.com/apache/grails-core/pull/15564#discussion_r3186055020


##########
grails-bootstrap/src/main/groovy/org/grails/exceptions/reporting/DefaultStackTraceFilterer.java:
##########
@@ -81,32 +89,32 @@ public Throwable filter(Throwable source, boolean 
recursive) {
         if (recursive) {
             Throwable current = source;
             while (current != null) {
-                current = filter(current);
+                filter(current);
                 current = current.getCause();
             }
+            return source;
         }
         return filter(source);
     }
 
     public Throwable filter(Throwable source) {
-        if (shouldFilter) {
-            StackTraceElement[] trace = source.getStackTrace();
-            List<StackTraceElement> newTrace = filterTraceWithCutOff(trace, 
cutOffPackage);
+        if (!shouldFilter) {
+            return source;
+        }
+        StackTraceElement[] trace = source.getStackTrace();
+        List<StackTraceElement> newTrace = filterTraceWithCutOff(trace, 
cutOffPackage);
 
-            if (newTrace.isEmpty()) {
-                // filter with no cut-off so at least there is some trace
-                newTrace = filterTraceWithCutOff(trace, null);
-            }
+        if (newTrace.isEmpty()) {
+            // filter with no cut-off so at least there is some trace
+            newTrace = filterTraceWithCutOff(trace, null);
+        }
 
-            // Only trim the trace if there was some application trace on the 
stack
-            // if not we will just skip sanitizing and leave it as is
-            if (!newTrace.isEmpty()) {
-                // We don't want to lose anything, so log it
-                STACK_LOG.error(FULL_STACK_TRACE_MESSAGE, source);

Review Comment:
   a config setting preserves both and we agreed in the weekly that this was 
the way forward, I am -1 on this without this



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to