This is an automated email from the ASF dual-hosted git repository. joshtynjala pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit d0e48ed478a5cd75d2b054f949736f8eabce46e3 Author: Josh Tynjala <[email protected]> AuthorDate: Thu Oct 31 10:37:45 2024 -0700 UnexpectedExceptionProblem: include message from exception --- .../apache/royale/compiler/problems/UnexpectedExceptionProblem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler-common/src/main/java/org/apache/royale/compiler/problems/UnexpectedExceptionProblem.java b/compiler-common/src/main/java/org/apache/royale/compiler/problems/UnexpectedExceptionProblem.java index f9e11603d..0fe1c8e17 100644 --- a/compiler-common/src/main/java/org/apache/royale/compiler/problems/UnexpectedExceptionProblem.java +++ b/compiler-common/src/main/java/org/apache/royale/compiler/problems/UnexpectedExceptionProblem.java @@ -25,7 +25,7 @@ package org.apache.royale.compiler.problems; public final class UnexpectedExceptionProblem extends CompilerProblem { public static final String DESCRIPTION = - "Unexpected exception '${exceptionName}' at ${exceptionLocation}"; + "Unexpected exception '${exceptionName}' with message '${exceptionMessage}' at ${exceptionLocation}"; public static final int errorCode = 1530; @@ -33,6 +33,7 @@ public final class UnexpectedExceptionProblem extends CompilerProblem { super(); this.exceptionName = throwable.getClass().getName(); + this.exceptionMessage = throwable.getMessage() != null ? throwable.getMessage() : ""; StringBuilder exceptionLocation = new StringBuilder(); boolean first = false; for (StackTraceElement element : throwable.getStackTrace()) @@ -48,5 +49,6 @@ public final class UnexpectedExceptionProblem extends CompilerProblem } public final String exceptionName; + public final String exceptionMessage; public final String exceptionLocation; }
