From c9c63baa6aca084be7a9302f240c080c9ab1454b Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期五, 24 一月 2025 16:46:50 +0800
Subject: [PATCH] 修改bug
---
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileUploadException.java | 61 ++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 0 deletions(-)
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileUploadException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileUploadException.java
new file mode 100644
index 0000000..c0f57cb
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/file/FileUploadException.java
@@ -0,0 +1,61 @@
+package com.ruoyi.common.core.exception.file;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+/**
+ * 文件上传异常类
+ *
+ * @author ruoyi
+ */
+public class FileUploadException extends Exception
+{
+
+ private static final long serialVersionUID = 1L;
+
+ private final Throwable cause;
+
+ public FileUploadException()
+ {
+ this(null, null);
+ }
+
+ public FileUploadException(final String msg)
+ {
+ this(msg, null);
+ }
+
+ public FileUploadException(String msg, Throwable cause)
+ {
+ super(msg);
+ this.cause = cause;
+ }
+
+ @Override
+ public void printStackTrace(PrintStream stream)
+ {
+ super.printStackTrace(stream);
+ if (cause != null)
+ {
+ stream.println("Caused by:");
+ cause.printStackTrace(stream);
+ }
+ }
+
+ @Override
+ public void printStackTrace(PrintWriter writer)
+ {
+ super.printStackTrace(writer);
+ if (cause != null)
+ {
+ writer.println("Caused by:");
+ cause.printStackTrace(writer);
+ }
+ }
+
+ @Override
+ public Throwable getCause()
+ {
+ return cause;
+ }
+}
--
Gitblit v1.7.1