mirror of https://github.com/apache/lucene.git
SOLR-6829: Added getter/setter for lastException in DIH's ContextImpl
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1643857 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e631a3f943
commit
7faa543ae0
|
@ -545,6 +545,8 @@ Other Changes
|
|||
* SOLR-6653: bin/solr script should return error code >0 when something fails
|
||||
(janhoy, Timothy Potter)
|
||||
|
||||
* SOLR-6829: Added getter/setter for lastException in DIH's ContextImpl (ehatcher)
|
||||
|
||||
================== 4.10.2 ==================
|
||||
|
||||
Bug FixesAnalyticsComponent
|
||||
|
|
|
@ -50,11 +50,12 @@ public class ContextImpl extends Context {
|
|||
|
||||
private Map<String, Object> entitySession, globalSession;
|
||||
|
||||
private Exception lastException = null;
|
||||
|
||||
DocBuilder.DocWrapper doc;
|
||||
|
||||
DocBuilder docBuilder;
|
||||
|
||||
Exception lastException = null;
|
||||
|
||||
|
||||
public ContextImpl(EntityProcessorWrapper epw, VariableResolver resolver,
|
||||
|
@ -255,4 +256,8 @@ public class ContextImpl extends Context {
|
|||
public String replaceTokens(String template) {
|
||||
return resolver.replaceTokens(template);
|
||||
}
|
||||
|
||||
public Exception getLastException() { return lastException; }
|
||||
|
||||
public void setLastException(Exception lastException) {this.lastException = lastException; }
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ public class DocBuilder {
|
|||
currentProcess = Context.FULL_DUMP;
|
||||
}
|
||||
ContextImpl ctx = new ContextImpl(null, getVariableResolver(), null, currentProcess, session, null, this);
|
||||
ctx.lastException = lastException;
|
||||
ctx.setLastException(lastException);
|
||||
listener.onEvent(ctx);
|
||||
}
|
||||
|
||||
|
|
|
@ -324,7 +324,7 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
|
|||
@Override
|
||||
public void onEvent(Context ctx) {
|
||||
executed = true;
|
||||
lastException = ((ContextImpl) ctx).lastException;
|
||||
lastException = ((ContextImpl) ctx).getLastException();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue