From a2374a86b36f38bae4bc0f9e85402ccd25e58e49 Mon Sep 17 00:00:00 2001 From: Hugi Thordarson Date: Fri, 1 Mar 2024 08:20:06 +0000 Subject: [PATCH] Simplify logic in NGExceptionPage(/Development) --- .../java/x/junk/NGExceptionPageDevelopment.java | 16 +--------------- .../NGExceptionPage.wo/NGExceptionPage.html | 6 +++--- .../NGExceptionPageDevelopment.html | 6 +++--- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/ng-appserver/src/main/java/x/junk/NGExceptionPageDevelopment.java b/ng-appserver/src/main/java/x/junk/NGExceptionPageDevelopment.java index 25b5625b..28bf8512 100644 --- a/ng-appserver/src/main/java/x/junk/NGExceptionPageDevelopment.java +++ b/ng-appserver/src/main/java/x/junk/NGExceptionPageDevelopment.java @@ -79,7 +79,7 @@ public LocalDateTime now() { * @return First line of the stack trace, essentially the causing line. */ public StackTraceElement firstLineOfTrace() { - StackTraceElement[] stackTrace = originalThrowable().getStackTrace(); + StackTraceElement[] stackTrace = exception().getStackTrace(); if( stackTrace.length == 0 ) { return null; @@ -227,20 +227,6 @@ public void setException( Throwable value ) { _exception = value; } - /** - * @return The original wrapped throwable (by walking up exception.cause until we reach the top) - */ - public Throwable originalThrowable() { - Throwable result = exception(); - - // FIXME: We're missing a nice mechanism to go don the "cause" path // Hugi 2024-02-11 - // while( result.getCause() != null ) { - // result = result.getCause(); - // } - - return result; - } - /** * @return The CSS class of the current row in the stack trace table. */ diff --git a/ng-appserver/src/main/resources/components/NGExceptionPage.wo/NGExceptionPage.html b/ng-appserver/src/main/resources/components/NGExceptionPage.wo/NGExceptionPage.html index 03deac55..8c5ece3a 100644 --- a/ng-appserver/src/main/resources/components/NGExceptionPage.wo/NGExceptionPage.html +++ b/ng-appserver/src/main/resources/components/NGExceptionPage.wo/NGExceptionPage.html @@ -97,8 +97,8 @@
-

-
+

+
@@ -106,7 +106,7 @@

- + diff --git a/ng-appserver/src/main/resources/components/NGExceptionPageDevelopment.wo/NGExceptionPageDevelopment.html b/ng-appserver/src/main/resources/components/NGExceptionPageDevelopment.wo/NGExceptionPageDevelopment.html index 5b6e406d..c9cec007 100644 --- a/ng-appserver/src/main/resources/components/NGExceptionPageDevelopment.wo/NGExceptionPageDevelopment.html +++ b/ng-appserver/src/main/resources/components/NGExceptionPageDevelopment.wo/NGExceptionPageDevelopment.html @@ -97,8 +97,8 @@
-

-
+

+
@@ -112,7 +112,7 @@

- +
File Method Package
Method Package