From b0c741553e904371453ff7764997ce19b4e26b1c Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 3 Sep 2015 09:48:34 +0200 Subject: [PATCH] It's up to the error page to display the error or not --- src/main/java/net/codestory/http/payload/PayloadWriter.java | 3 +-- src/main/resources/app/500.html | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/codestory/http/payload/PayloadWriter.java b/src/main/java/net/codestory/http/payload/PayloadWriter.java index 30b58419..38eaa2ab 100644 --- a/src/main/java/net/codestory/http/payload/PayloadWriter.java +++ b/src/main/java/net/codestory/http/payload/PayloadWriter.java @@ -501,8 +501,7 @@ protected Payload errorPage(int errorCode, Throwable e) { } protected Payload errorPageHtml(int errorCode, Throwable e) { - Throwable shownError = env.prodMode() ? null : e; - return new ErrorPage(errorCode, shownError).payload(); + return new ErrorPage(errorCode, e).payload(); } protected Payload errorAsJson(int errorCode, Throwable e) { diff --git a/src/main/resources/app/500.html b/src/main/resources/app/500.html index 028a5359..91858be5 100644 --- a/src/main/resources/app/500.html +++ b/src/main/resources/app/500.html @@ -41,7 +41,7 @@

An error occurred on the server

Credits : ThreeHeadedMonkey

-
[[ERROR]]
+[[#unless env.prodMode]]
[[ERROR]]
[[/unless]] [[livereload]]