Index: trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 15276)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 15277)
@@ -13,4 +13,5 @@
 import javax.script.ScriptEngine;
 import javax.script.ScriptException;
+import javax.swing.JOptionPane;
 
 import org.openstreetmap.josm.command.ChangePropertyCommand;
@@ -19,4 +20,5 @@
 import org.openstreetmap.josm.data.validation.Test;
 import org.openstreetmap.josm.data.validation.TestError;
+import org.openstreetmap.josm.gui.Notification;
 import org.openstreetmap.josm.io.CachedFile;
 import org.openstreetmap.josm.tools.LanguageInfo;
@@ -52,4 +54,7 @@
             try (CachedFile cf = new CachedFile("resource://data/validator/opening_hours.js");
                  Reader reader = cf.getContentReader()) {
+                ENGINE.eval(
+                        "var global=this;var window=this;var process={env:{}};" +
+                        "var console={};console.debug=print;console.log=print;console.warn=print;console.error=print;");
                 ENGINE.eval(reader);
                 ENGINE.eval("var opening_hours = require('opening_hours');");
@@ -247,4 +252,5 @@
         } catch (ScriptException | NoSuchMethodException ex) {
             Logging.error(ex);
+            new Notification(Utils.getRootCause(ex).getMessage()).setIcon(JOptionPane.ERROR_MESSAGE).show();
         }
         return errors;
