com.gitee.cliveyuan.tools.exception.CsvException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-tools Show documentation
Show all versions of java-tools Show documentation
Some commonly used methods in java
package com.gitee.cliveyuan.tools.exception;
/**
* CSV异常
*
* @author clive
* Created on 2018/07/27
* @since 1.0
*/
public class CsvException extends BaseException {
public CsvException(int code, String message) {
super(code, message);
}
public static CsvException failToMkdirs() {
return new CsvException(1000, "fail to create folder(s)");
}
public static CsvException failToGenerateCsv() {
return new CsvException(1001, "fail to generate excel");
}
public static CsvException failToParseCsv() {
return new CsvException(1004, "fail to parse excel");
}
public static CsvException notSupport(String extension) {
return new CsvException(1005, "not support this csv format:" + extension);
}
}