Skip to content

Commit

Permalink
Merge pull request Netflix#250 from gzurowski/exception-handling-cleanup
Browse files Browse the repository at this point in the history
Clean up exception handling
  • Loading branch information
mikeycohen authored Aug 8, 2016
2 parents 76b6965 + d95b04f commit 75956e8
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions zuul-core/src/main/java/com/netflix/zuul/FilterProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,11 @@ public void setFilterUsageNotifier(FilterUsageNotifier notifier) {
public void postRoute() throws ZuulException {
try {
runFilters("post");
} catch (ZuulException e) {
throw e;
} catch (Throwable e) {
if (e instanceof ZuulException) {
throw (ZuulException) e;
}
throw new ZuulException(e, 500, "UNCAUGHT_EXCEPTION_IN_POST_FILTER_" + e.getClass().getName());
}

}

/**
Expand All @@ -118,10 +116,9 @@ public void error() {
public void route() throws ZuulException {
try {
runFilters("route");
} catch (ZuulException e) {
throw e;
} catch (Throwable e) {
if (e instanceof ZuulException) {
throw (ZuulException) e;
}
throw new ZuulException(e, 500, "UNCAUGHT_EXCEPTION_IN_ROUTE_FILTER_" + e.getClass().getName());
}
}
Expand All @@ -134,10 +131,9 @@ public void route() throws ZuulException {
public void preRoute() throws ZuulException {
try {
runFilters("pre");
} catch (ZuulException e) {
throw e;
} catch (Throwable e) {
if (e instanceof ZuulException) {
throw (ZuulException) e;
}
throw new ZuulException(e, 500, "UNCAUGHT_EXCEPTION_IN_PRE_FILTER_" + e.getClass().getName());
}
}
Expand Down

0 comments on commit 75956e8

Please sign in to comment.