From f44a6e90b0de2926522db4f7cb3b56d00c2fab8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20Sch=C3=A4rtl?= <andreas@schaertl.me>
Date: Tue, 15 Sep 2020 11:55:18 +0200
Subject: [PATCH] hint to the log messages on error

---
 .../src/main/java/info/mathhub/uloapi/html/Errors.java       | 2 ++
 .../src/main/resources/spark/template/freemarker/error.flt   | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/src/ulo-storage-applications/src/main/java/info/mathhub/uloapi/html/Errors.java b/src/ulo-storage-applications/src/main/java/info/mathhub/uloapi/html/Errors.java
index dce0b3a..1df9573 100644
--- a/src/ulo-storage-applications/src/main/java/info/mathhub/uloapi/html/Errors.java
+++ b/src/ulo-storage-applications/src/main/java/info/mathhub/uloapi/html/Errors.java
@@ -17,6 +17,8 @@ public class Errors {
     /**
      * Singleton instance of the Freemarker engine for use with errors.
      * Used in {@link Errors#createError}.
+     *
+     * This object is not safe for concurrent use by multiple threads.
      */
     private static final FreeMarkerEngine freemarker = new FreeMarkerEngine();
 
diff --git a/src/ulo-storage-applications/src/main/resources/spark/template/freemarker/error.flt b/src/ulo-storage-applications/src/main/resources/spark/template/freemarker/error.flt
index 5a41171..ee264ca 100644
--- a/src/ulo-storage-applications/src/main/resources/spark/template/freemarker/error.flt
+++ b/src/ulo-storage-applications/src/main/resources/spark/template/freemarker/error.flt
@@ -7,6 +7,11 @@
 <#macro page_main>
     <h2>Error ${http_status}: ${http_description}</h2>
 
+    <p>
+        If you are the administrator of this instance, consider looking at the log
+        output.
+    </p>
+
     <#if message?has_content>
         <code>
             ${exception_message}
-- 
GitLab