You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2023/01/12 09:17:49 UTC

[uima-uimaj] branch feature/268-UIMA-components-log-and-then-re-throw-exceptions-which-usually-leads-to-errors-being-logged-twice created (now 66e648dc5)

This is an automated email from the ASF dual-hosted git repository.

rec pushed a change to branch feature/268-UIMA-components-log-and-then-re-throw-exceptions-which-usually-leads-to-errors-being-logged-twice
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git


      at 66e648dc5 Issue #268: UIMA components log and then re-throw exceptions which usually leads to errors being logged twice

This branch includes the following new commits:

     new 66e648dc5 Issue #268: UIMA components log and then re-throw exceptions which usually leads to errors being logged twice

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[uima-uimaj] 01/01: Issue #268: UIMA components log and then re-throw exceptions which usually leads to errors being logged twice

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rec pushed a commit to branch feature/268-UIMA-components-log-and-then-re-throw-exceptions-which-usually-leads-to-errors-being-logged-twice
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git

commit 66e648dc5fe51eb9ec6180dc23080a9be07948a6
Author: Richard Eckart de Castilho <re...@apache.org>
AuthorDate: Thu Jan 12 10:17:42 2023 +0100

    Issue #268: UIMA components log and then re-throw exceptions which usually leads to errors being logged twice
    
    - Remove logging statement
---
 .../analysis_engine/impl/PrimitiveAnalysisEngine_impl.java     | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/PrimitiveAnalysisEngine_impl.java b/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/PrimitiveAnalysisEngine_impl.java
index b45b9a963..22fca8562 100644
--- a/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/PrimitiveAnalysisEngine_impl.java
+++ b/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/PrimitiveAnalysisEngine_impl.java
@@ -428,14 +428,10 @@ public class PrimitiveAnalysisEngine_impl extends AnalysisEngineImplBase impleme
       // log end of event
       logger.logrb(Level.FINE, CLASS_NAME.getName(), "process", LOG_RESOURCE_BUNDLE,
               "UIMA_analysis_engine_process_end__FINE", resourceName);
+    } catch (AnalysisEngineProcessException e) {
+      throw e;
     } catch (Exception e) {
-      // log and rethrow exception
-      logger.log(Level.SEVERE, "", e);
-      if (e instanceof AnalysisEngineProcessException) {
-        throw (AnalysisEngineProcessException) e;
-      } else {
-        throw new AnalysisEngineProcessException(e);
-      }
+      throw new AnalysisEngineProcessException(e);
     }
   }