You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2015/06/29 20:44:40 UTC

svn commit: r1688283 - in /uima/sandbox/uima-ducc/trunk: uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/config/ uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/config/

Author: cwiklik
Date: Mon Jun 29 18:44:39 2015
New Revision: 1688283

URL: http://svn.apache.org/r1688283
Log:
UIMA-4491 modified to log exceptions in SM and OR ErrorProcessor 

Modified:
    uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/config/OrchestratorConfiguration.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/config/ServiceManagerConfiguration.java

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/config/OrchestratorConfiguration.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/config/OrchestratorConfiguration.java?rev=1688283&r1=1688282&r2=1688283&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/config/OrchestratorConfiguration.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/config/OrchestratorConfiguration.java Mon Jun 29 18:44:39 2015
@@ -307,8 +307,8 @@ public class OrchestratorConfiguration {
     public void process(Exchange exchange) throws Exception {
       // the caused by exception is stored in a property on the exchange
       Throwable caused = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class);
+      duccLogger.error("ErrorProcessor.process",null, caused);
       exchange.getOut().setBody(caused); //XStreamUtils.marshall(caused));
-      caused.printStackTrace();
     }
   }
   public class ServiceRequestHandler {

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/config/ServiceManagerConfiguration.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/config/ServiceManagerConfiguration.java?rev=1688283&r1=1688282&r2=1688283&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/config/ServiceManagerConfiguration.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/config/ServiceManagerConfiguration.java Mon Jun 29 18:44:39 2015
@@ -176,8 +176,13 @@ public class ServiceManagerConfiguration
         public void process(Exchange exchange) throws Exception {
             // the caused by exception is stored in a property on the exchange
             Throwable caused = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class);
-            exchange.getOut().setBody(XStreamUtils.marshall(caused));
-            logger.error("ErrorProcessor.process", null, caused);
+            try {
+                logger.error("ErrorProcessor.process", null, caused);
+                exchange.getOut().setBody(XStreamUtils.marshall(caused));
+            	
+            } catch( Throwable t ) {
+                logger.error("ErrorProcessor.process", null,t);
+            }
         }
     }