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 2009/07/02 18:44:21 UTC
svn commit: r790664 -
/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java
Author: cwiklik
Date: Thu Jul 2 16:44:21 2009
New Revision: 790664
URL: http://svn.apache.org/viewvc?rev=790664&view=rev
Log:
UIMA-1416 Add Input Cas Id and Throwable to ErrorContext before calling handleAction
Modified:
incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java?rev=790664&r1=790663&r2=790664&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java Thu Jul 2 16:44:21 2009
@@ -387,6 +387,22 @@
delegateKey = key;
anErrorContext.add( AsynchAEMessage.SkipPendingLists, "true");
}
+ if (ErrorHandler.TERMINATE.equalsIgnoreCase(threshold.getAction()) ){
+ anErrorContext.add(ErrorContext.THROWABLE_ERROR, t);
+ if ( casReferenceId != null ) {
+ try {
+ CasStateEntry casStateEntry = aController.getLocalCache().lookupEntry(casReferenceId);
+ if ( casStateEntry != null && casStateEntry.isSubordinate()) {
+ CasStateEntry parenCasStateEntry = aController.getLocalCache().getTopCasAncestor(casReferenceId);
+ // Replace Cas Id with the parent Cas Id
+ anErrorContext.remove(AsynchAEMessage.CasReference);
+ anErrorContext.add(AsynchAEMessage.CasReference, parenCasStateEntry.getCasReferenceId());
+ }
+ } catch( Exception e) {}
+ }
+
+ }
+
aController.takeAction(threshold.getAction(), key, anErrorContext);
}
}