Commit c8d5c616 authored by jiaorz's avatar jiaorz

全局异常

parent 48ee55a1
......@@ -57,7 +57,7 @@ public class GlobalExceptionHandler {
@ExceptionHandler(Exception.class)
public ObjectRestResponse<?> exceptionHandler(Exception e){
Throwable cause = e.getCause();
if(cause != null && cause.toString().contains("com.netflix.client.ClientException")) {
if(cause != null && cause.toString().contains("ExceptionLoggingFilter")) {
logger.error(cause.getMessage(), e);
return assembleResult(ObjectRestResponse.createFailedResult(5000, "服务器开小差了,请稍后重试!"), "Server exception: " + e.getMessage());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment