Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2020-03-23 06:43:41 +0000
committerEike Stepper2020-03-23 06:43:41 +0000
commit5b64b0eb7410e420c6d1cc86d815297873ddfcc9 (patch)
tree847ee6d2cad41c096e51f1a816fddb5504b397f2
parentc70262fe5eefc4ef19a24cd6b18d7508c5a7d40b (diff)
downloadcdo-5b64b0eb7410e420c6d1cc86d815297873ddfcc9.tar.gz
cdo-5b64b0eb7410e420c6d1cc86d815297873ddfcc9.tar.xz
cdo-5b64b0eb7410e420c6d1cc86d815297873ddfcc9.zip
[536332] Log exceptions caught in org.eclipse.net4j.signal.Signal.run()
https://bugs.eclipse.org/bugs/show_bug.cgi?id=536332
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java
index 4aae656d55..44c9186f96 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java
@@ -19,6 +19,7 @@ import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import org.eclipse.net4j.util.io.IOTimeoutException;
import org.eclipse.net4j.util.io.IOUtil;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.om.OMPlatform;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.OM;
@@ -40,6 +41,8 @@ public abstract class Signal implements Runnable
*/
public static final long NO_TIMEOUT = BufferInputStream.NO_TIMEOUT;
+ private static final boolean DISABLE_LOG_EXCEPTIONS = OMPlatform.INSTANCE.isProperty("org.eclipse.net4j.signal.Signal.disableLogExceptions");
+
private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_SIGNAL, Signal.class);
private SignalProtocol<?> protocol;
@@ -167,9 +170,16 @@ public abstract class Signal implements Runnable
}
catch (Exception ex)
{
- if (TRACER.isEnabled())
+ if (DISABLE_LOG_EXCEPTIONS)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Exception in signal", ex); //$NON-NLS-1$
+ }
+ }
+ else
{
- TRACER.trace("Exception in signal", ex); //$NON-NLS-1$
+ OM.LOG.error(ex);
}
}
finally

Back to the top