[#3234] Handle also RuntimeExceptions
This commit is contained in:
parent
6f63e5f55f
commit
6d482ab35e
@ -331,6 +331,11 @@ abstract class AbstractQuery extends AbstractQueryPart implements Query, Attacha
|
||||
result = execute(ctx, listener);
|
||||
return result;
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
ctx.exception(e);
|
||||
listener.exception(ctx);
|
||||
throw ctx.exception();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
ctx.sqlException(e);
|
||||
listener.exception(ctx);
|
||||
|
||||
@ -303,6 +303,11 @@ public abstract class AbstractRoutine<T> extends AbstractQueryPart implements Ro
|
||||
fetchOutParameters(ctx);
|
||||
return 0;
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
ctx.exception(e);
|
||||
listener.exception(ctx);
|
||||
throw ctx.exception();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
ctx.sqlException(e);
|
||||
listener.exception(ctx);
|
||||
@ -325,7 +330,7 @@ public abstract class AbstractRoutine<T> extends AbstractQueryPart implements Ro
|
||||
consumeExceptions(ctx.configuration(), ctx.statement(), e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
|
||||
finally {
|
||||
consumeWarnings(ctx, listener);
|
||||
}
|
||||
|
||||
@ -113,6 +113,11 @@ class BatchMultiple implements Batch {
|
||||
consumeWarnings(ctx, listener);
|
||||
}
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
ctx.exception(e);
|
||||
listener.exception(ctx);
|
||||
throw ctx.exception();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
ctx.sqlException(e);
|
||||
listener.exception(ctx);
|
||||
|
||||
@ -166,6 +166,11 @@ class BatchSingle implements BatchBindStep {
|
||||
consumeWarnings(ctx, listener);
|
||||
}
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
ctx.exception(e);
|
||||
listener.exception(ctx);
|
||||
throw ctx.exception();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
ctx.sqlException(e);
|
||||
listener.exception(ctx);
|
||||
|
||||
@ -1415,6 +1415,11 @@ class CursorImpl<R extends Record> implements Cursor<R> {
|
||||
rows++;
|
||||
}
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
ctx.exception(e);
|
||||
listener.exception(ctx);
|
||||
throw ctx.exception();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
ctx.sqlException(e);
|
||||
listener.exception(ctx);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user