接口报错时打印参数
This commit is contained in:
parent
a2e9c482a4
commit
b57bdcc7eb
|
|
@ -56,14 +56,14 @@ public class ResponseResult<T, R> {
|
|||
}
|
||||
return Ok(f.apply(t));
|
||||
} catch (SalaryRunTimeException e) {
|
||||
log.error("salary api run fail", e);
|
||||
log.error("salary api run fail , param {}", t, e);
|
||||
return Error(e.getMessage());
|
||||
} catch (ECException e) {
|
||||
log.error("salary api run fail", e);
|
||||
log.error("salary api run fail , param {}", t, e);
|
||||
Throwable cause = e.getCause();
|
||||
return Error(cause.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error("salary api run fail", e);
|
||||
log.error("salary api run fail , param {}", t, e);
|
||||
return Error("系统异常!");
|
||||
}
|
||||
}
|
||||
|
|
@ -79,13 +79,13 @@ public class ResponseResult<T, R> {
|
|||
f.accept(t);
|
||||
return Ok();
|
||||
} catch (SalaryRunTimeException e) {
|
||||
log.error("salary api run fail", e);
|
||||
log.error("salary api run fail , param {}", t, e);
|
||||
return Error(e.getMessage());
|
||||
} catch (ECException e) {
|
||||
log.error("salary api run fail", e);
|
||||
log.error("salary api run fail , param {}", t, e);
|
||||
return Error(ExceptionUtil.getRealMessage(e));
|
||||
} catch (Exception e) {
|
||||
log.error("salary api run fail", e);
|
||||
log.error("salary api run fail , param {}", t, e);
|
||||
return Error("系统异常!", e);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue