This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 5895ec5040 minor refactor: use Throwable instead of Exception to not
lose info on AssertionError
5895ec5040 is described below
commit 5895ec5040b734be5844c6fde36d5b3ddf997238
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 377698c915..217cd64584 100644
--- a/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
+++ b/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
@@ -621,7 +621,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();
@@ -638,7 +638,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();