From e957accd5326ad44705aa3b8301639c070514d23 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 6 Apr 2022 17:20:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exception/ExcelAnalysisException.java | 2 +- .../excel/exception/ExcelCommonException.java | 2 +- .../exception/ExcelDataConvertException.java | 2 +- .../excel/exception/ExcelException.java | 21 +++++++++++++++++++ .../exception/ExcelGenerateException.java | 2 +- 5 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelException.java diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelAnalysisException.java b/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelAnalysisException.java index 490c541e..64e3353b 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelAnalysisException.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelAnalysisException.java @@ -4,7 +4,7 @@ package com.alibaba.excel.exception; * * @author jipengfei */ -public class ExcelAnalysisException extends RuntimeException { +public class ExcelAnalysisException extends ExcelException { public ExcelAnalysisException() {} diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelCommonException.java b/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelCommonException.java index d8612147..5ab28025 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelCommonException.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelCommonException.java @@ -4,7 +4,7 @@ package com.alibaba.excel.exception; * * @author Jiaju Zhuang */ -public class ExcelCommonException extends RuntimeException { +public class ExcelCommonException extends ExcelException { public ExcelCommonException() {} diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelDataConvertException.java b/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelDataConvertException.java index ff1b409d..c490fa40 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelDataConvertException.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelDataConvertException.java @@ -16,7 +16,7 @@ import lombok.Setter; @Getter @Setter @EqualsAndHashCode -public class ExcelDataConvertException extends RuntimeException { +public class ExcelDataConvertException extends ExcelException { /** * NotNull. */ diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelException.java b/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelException.java new file mode 100644 index 00000000..da6401f5 --- /dev/null +++ b/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelException.java @@ -0,0 +1,21 @@ +package com.alibaba.excel.exception; + +/** + * Excel Exception + * @author Jiaju Zhuang + */ +public class ExcelException extends RuntimeException { + public ExcelException() {} + + public ExcelException(String message) { + super(message); + } + + public ExcelException(String message, Throwable cause) { + super(message, cause); + } + + public ExcelException(Throwable cause) { + super(cause); + } +} diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelGenerateException.java b/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelGenerateException.java index f508b17f..3565cec3 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelGenerateException.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/exception/ExcelGenerateException.java @@ -3,7 +3,7 @@ package com.alibaba.excel.exception; /** * @author jipengfei */ -public class ExcelGenerateException extends RuntimeException { +public class ExcelGenerateException extends ExcelException { public ExcelGenerateException(String message) { super(message);