|
@@ -5,6 +5,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.exception.DemoModeException;
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
+import org.apache.catalina.connector.ClientAbortException;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.dao.DuplicateKeyException;
|
|
@@ -104,6 +105,14 @@ public class GlobalExceptionHandler {
|
|
|
String message = e.getBindingResult().getFieldError().getDefaultMessage();
|
|
|
return AjaxResult.error(message);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 管道破裂异常
|
|
|
+ */
|
|
|
+ @ExceptionHandler(ClientAbortException.class)
|
|
|
+ public Object clientAbortExceptionException(ClientAbortException e) {
|
|
|
+ return AjaxResult.error(e.getMessage());
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 演示模式异常
|