[#3427] Internal QueryCollectorSignal exception escapes into user code when not dealt with in ExecuteListener
This commit is contained in:
parent
79ad8c8b7d
commit
c417085008
@ -69,6 +69,7 @@ import org.jooq.Query;
|
||||
import org.jooq.RenderContext;
|
||||
import org.jooq.conf.ParamType;
|
||||
import org.jooq.conf.StatementType;
|
||||
import org.jooq.exception.ControlFlowSignal;
|
||||
import org.jooq.exception.DetachedException;
|
||||
import org.jooq.tools.JooqLogger;
|
||||
|
||||
@ -333,6 +334,11 @@ abstract class AbstractQuery extends AbstractQueryPart implements Query, Attacha
|
||||
result = execute(ctx, listener);
|
||||
return result;
|
||||
}
|
||||
|
||||
// [#3427] ControlFlowSignals must not be passed on to ExecuteListners
|
||||
catch (ControlFlowSignal e) {
|
||||
throw e;
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
ctx.exception(e);
|
||||
listener.exception(ctx);
|
||||
|
||||
@ -86,6 +86,7 @@ import org.jooq.Routine;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.UDTField;
|
||||
import org.jooq.UDTRecord;
|
||||
import org.jooq.exception.ControlFlowSignal;
|
||||
import org.jooq.tools.Convert;
|
||||
|
||||
/**
|
||||
@ -310,6 +311,11 @@ public abstract class AbstractRoutine<T> extends AbstractQueryPart implements Ro
|
||||
fetchOutParameters(ctx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// [#3427] ControlFlowSignals must not be passed on to ExecuteListners
|
||||
catch (ControlFlowSignal e) {
|
||||
throw e;
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
ctx.exception(e);
|
||||
listener.exception(ctx);
|
||||
|
||||
@ -50,6 +50,7 @@ import org.jooq.Configuration;
|
||||
import org.jooq.ExecuteContext;
|
||||
import org.jooq.ExecuteListener;
|
||||
import org.jooq.Query;
|
||||
import org.jooq.exception.ControlFlowSignal;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
@ -113,6 +114,11 @@ class BatchMultiple implements Batch {
|
||||
consumeWarnings(ctx, listener);
|
||||
}
|
||||
}
|
||||
|
||||
// [#3427] ControlFlowSignals must not be passed on to ExecuteListners
|
||||
catch (ControlFlowSignal e) {
|
||||
throw e;
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
ctx.exception(e);
|
||||
listener.exception(ctx);
|
||||
|
||||
@ -43,8 +43,8 @@ package org.jooq.impl;
|
||||
import static org.jooq.conf.ParamType.INLINED;
|
||||
import static org.jooq.conf.SettingsTools.executeStaticStatements;
|
||||
import static org.jooq.impl.Utils.consumeWarnings;
|
||||
import static org.jooq.impl.Utils.fields;
|
||||
import static org.jooq.impl.Utils.dataTypes;
|
||||
import static org.jooq.impl.Utils.fields;
|
||||
import static org.jooq.impl.Utils.visitAll;
|
||||
|
||||
import java.sql.Connection;
|
||||
@ -60,6 +60,7 @@ import org.jooq.ExecuteContext;
|
||||
import org.jooq.ExecuteListener;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Query;
|
||||
import org.jooq.exception.ControlFlowSignal;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
@ -166,6 +167,11 @@ class BatchSingle implements BatchBindStep {
|
||||
consumeWarnings(ctx, listener);
|
||||
}
|
||||
}
|
||||
|
||||
// [#3427] ControlFlowSignals must not be passed on to ExecuteListners
|
||||
catch (ControlFlowSignal e) {
|
||||
throw e;
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
ctx.exception(e);
|
||||
listener.exception(ctx);
|
||||
|
||||
@ -79,6 +79,7 @@ import org.jooq.RecordType;
|
||||
import org.jooq.Result;
|
||||
import org.jooq.Row;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.exception.ControlFlowSignal;
|
||||
import org.jooq.tools.JooqLogger;
|
||||
import org.jooq.tools.jdbc.JDBC41ResultSet;
|
||||
import org.jooq.tools.jdbc.JDBCUtils;
|
||||
@ -1414,6 +1415,11 @@ class CursorImpl<R extends Record> implements Cursor<R> {
|
||||
rows++;
|
||||
}
|
||||
}
|
||||
|
||||
// [#3427] ControlFlowSignals must not be passed on to ExecuteListners
|
||||
catch (ControlFlowSignal e) {
|
||||
throw e;
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
ctx.exception(e);
|
||||
listener.exception(ctx);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user