Skip the subclasses of FizzRuntimeException in pipeline #276
This commit is contained in:
@@ -43,6 +43,8 @@ import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
import we.constants.CommonConstants;
|
||||
import we.exception.ExecuteScriptException;
|
||||
import we.exception.RedirectException;
|
||||
import we.exception.StopAndResponseException;
|
||||
import we.fizz.component.ComponentHelper;
|
||||
import we.fizz.component.IComponent;
|
||||
import we.fizz.component.StepContextPosition;
|
||||
@@ -88,7 +90,7 @@ public class Pipeline {
|
||||
|
||||
public Mono<AggregateResult> run(Input input, Map<String, Object> clientInput, String traceId) {
|
||||
return this.runPipeline(input, clientInput, traceId).onErrorResume((ex) -> {
|
||||
String message = null;
|
||||
String message = ex.getMessage();
|
||||
if (ex.getMessage() == null) {
|
||||
message = "failed to run aggregation pipeline, message: " + ex.toString();
|
||||
StackTraceElement[] stacks = ex.getStackTrace();
|
||||
@@ -96,6 +98,15 @@ public class Pipeline {
|
||||
message = message + " at " + stacks[0];
|
||||
}
|
||||
}
|
||||
if (ex instanceof StopAndResponseException) {
|
||||
throw (StopAndResponseException) ex;
|
||||
}
|
||||
if (ex instanceof RedirectException) {
|
||||
throw (RedirectException) ex;
|
||||
}
|
||||
if (ex instanceof ExecuteScriptException) {
|
||||
throw (ExecuteScriptException) ex;
|
||||
}
|
||||
if (ex instanceof FizzRuntimeException && ex.getMessage() != null) {
|
||||
FizzRuntimeException e = (FizzRuntimeException) ex;
|
||||
if (e.getStepContext() == null) {
|
||||
|
||||
Reference in New Issue
Block a user