All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gitee.cliveyuan.tools.exception.FileUploadException Maven / Gradle / Ivy

There is a newer version: 4.0.6
Show newest version
package com.gitee.cliveyuan.tools.exception;

/**
 * 文件上传异常
 *
 * @author clive
 * Created on 2018/07/27
 * @since 1.0
 */
public class FileUploadException extends BaseException {

    public FileUploadException(int code, String message) {
        super(code, message);
    }

    public static FileUploadException uploadPathNotExist() {
        return new FileUploadException(1000, "upload path not exist");
    }

    public static FileUploadException notSupport(String message) {
        return new FileUploadException(1001, message);
    }
    public static FileUploadException failToMkdirs(String folder) {
        return new FileUploadException(1002, "fail to create folder(s): " + folder);
    }
    public static FileUploadException fileEmpty() {
        return new FileUploadException(1003, "file is empty");
    }
    public static FileUploadException unKnowError() {
        return new FileUploadException(1003, "unKnow Error");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy