From ad522c7697632eea5751fd6adffbaa73ace97407 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sat, 11 Sep 2010 06:31:39 +0200 Subject: [PATCH] Added a sysconfig variable for global error debugging in ErrorHandler. --- src/dolda/jsvc/util/ErrorHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dolda/jsvc/util/ErrorHandler.java b/src/dolda/jsvc/util/ErrorHandler.java index d840ee7..ca4900a 100644 --- a/src/dolda/jsvc/util/ErrorHandler.java +++ b/src/dolda/jsvc/util/ErrorHandler.java @@ -52,6 +52,11 @@ public class ErrorHandler implements Responder { } protected boolean debug(Request req, Throwable t) { + ThreadContext thc = ThreadContext.current(); + if(thc != null) { + if(Misc.boolval(thc.server().sysconfig("jsvc.debug-errors", "0"))) + return(true); + } SocketAddress rem = req.remoteaddr(); return((rem instanceof InetSocketAddress) && ((InetSocketAddress)rem).getAddress().isLoopbackAddress()); } -- 2.11.0