Skip to content

Commit

Permalink
improve the exception created
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Dec 17, 2024
1 parent 3f53869 commit 7b92f77
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/lucee/commons/lang/ExceptionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.Arrays;
import java.util.Iterator;

import lucee.print;
import lucee.commons.io.SystemUtil.TemplateLine;
import lucee.commons.io.res.Resource;
import lucee.commons.io.res.util.ResourceUtil;
Expand Down Expand Up @@ -325,6 +326,8 @@ public static void initCauseEL(Throwable e, Throwable cause) {
e.initCause(cause);
}
catch (Exception ex) {
print.e("xxxxxxxxxxxx");
print.e(ex);
}
}

Expand Down
13 changes: 2 additions & 11 deletions core/src/main/java/lucee/runtime/exp/PageRuntimeException.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
**/
package lucee.runtime.exp;

import lucee.commons.lang.ExceptionUtil;
import lucee.runtime.PageContext;
import lucee.runtime.PageSource;
import lucee.runtime.config.Config;
Expand All @@ -41,17 +42,7 @@ public class PageRuntimeException extends RuntimeException implements IPageExcep
public PageRuntimeException(Throwable t) {
super(t.getMessage(), t);
this.pe = Caster.toPageException(t);
}

/**
* constructor of the class
*
* @param pe page exception to hold
*/
public PageRuntimeException(PageException pe) {
super(pe.getMessage(), pe);
setStackTrace(pe.getStackTrace());
this.pe = pe;
ExceptionUtil.initCauseEL(this, t);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public BIF getBIF() {
}
catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
throw new RuntimeException(t);
throw new PageRuntimeException(t);
}
}
else {
Expand Down
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">

<property name="version" value="6.2.0.220-SNAPSHOT"/>
<property name="version" value="6.2.0.221-SNAPSHOT"/>

<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>6.2.0.220-SNAPSHOT</version>
<version>6.2.0.221-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down

0 comments on commit 7b92f77

Please sign in to comment.