This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_5_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_5_0_X by this push:
new 9941325631 minor refactor: use Throwable instead of Exception to not
lose info on AssertionError
9941325631 is described below
commit 9941325631af01c28e62b48475fc72d2f7b06fea
Author: Paul King <[email protected]>
AuthorDate: Mon Apr 6 16:59:31 2026 +1000
minor refactor: use Throwable instead of Exception to not lose info on
AssertionError
---
src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
b/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
index 6e4d037ac8..24bad87ced 100644
--- a/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
+++ b/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
@@ -622,7 +622,7 @@ public class AsmClassGenerator extends ClassGenerator {
try {
mv.visitMaxs(0, 0);
- } catch (Exception e) {
+ } catch (Throwable t) {
Writer writer = null;
if (mv instanceof TraceMethodVisitor) {
writer = new StringBuilderWriter();
@@ -639,7 +639,7 @@ public class AsmClassGenerator extends ClassGenerator {
message.append("\nLast known generated bytecode in last
generated method or constructor:\n");
message.append(writer);
}
- throw new GroovyRuntimeException(message.toString(), e);
+ throw new GroovyRuntimeException(message.toString(), t);
}
}
mv.visitEnd();