|
@@ -2,6 +2,7 @@ package cn.kdan.pdf.backend.core.config;
|
|
|
|
|
|
import constant.CommonConstant;
|
|
|
import exception.BackendRuntimeException;
|
|
|
+import exception.TooManyDeviceException;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.context.support.DefaultMessageSourceResolvable;
|
|
@@ -42,6 +43,12 @@ public class ControllerExceptionHandler {
|
|
|
return new ResultMap<>(CommonConstant.EXCEPTION_CODE_RUNTIME_ERROR, e.getMessage());
|
|
|
}
|
|
|
|
|
|
+ @ExceptionHandler(TooManyDeviceException.class)
|
|
|
+ @ResponseBody
|
|
|
+ public ResultMap<?> handlerDevOpsTooManyDeviceException(TooManyDeviceException e) {
|
|
|
+ return new ResultMap<>(CommonConstant.EXCEPTION_CODE_TOO_MANY_DEVICE_ERROR, e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
@ExceptionHandler(ConstraintViolationException.class)
|
|
|
@ResponseBody
|
|
|
public ResultMap<?> handlerConstraintViolationException(ConstraintViolationException e) {
|