mirror of
https://github.com/ethauvin/rife2.git
synced 2025-04-30 18:48:13 -07:00
Better pretty exception printing for some template exceptions
This commit is contained in:
parent
7b081368a7
commit
b0896942fd
1 changed files with 4 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
||||||
package rife.tools;
|
package rife.tools;
|
||||||
|
|
||||||
import rife.template.Template;
|
import rife.template.Template;
|
||||||
import rife.template.exceptions.SyntaxErrorException;
|
import rife.template.exceptions.*;
|
||||||
|
|
||||||
public abstract class ExceptionFormattingUtils {
|
public abstract class ExceptionFormattingUtils {
|
||||||
private static final int DEFAULT_STACKTRACELIMIT = 15;
|
private static final int DEFAULT_STACKTRACELIMIT = 15;
|
||||||
|
@ -92,7 +92,9 @@ public abstract class ExceptionFormattingUtils {
|
||||||
template.setValue("exception_stack_trace", stack_trace_out.toString());
|
template.setValue("exception_stack_trace", stack_trace_out.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exception instanceof SyntaxErrorException) {
|
if (exception instanceof SyntaxErrorException ||
|
||||||
|
exception instanceof IncludeNotFoundException ||
|
||||||
|
exception instanceof CircularIncludesException) {
|
||||||
exceptions.append(template.getBlock("exception_compilation"));
|
exceptions.append(template.getBlock("exception_compilation"));
|
||||||
} else {
|
} else {
|
||||||
exceptions.append(template.getBlock("exception"));
|
exceptions.append(template.getBlock("exception"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue