package com.yunfeiyun.agmp.common.exception;

import com.yunfeiyun.agmp.common.constant.ErrorCode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * OSS文件上传 误异常类
 *
 * @author 杨晓辉
 */
public class OssFileUploadException extends FileUploadException{
    private static final Logger log = LoggerFactory.getLogger(OssFileUploadException.class);
    private static final long serialVersionUID = 1L;
    private String filename;
    private String filepath;
    private String extension;

    public OssFileUploadException(String filepath, String extension, String filename)
    {
        super(ErrorCode.UPLOAD_OSS_FAIL.getCode(), ErrorCode.UPLOAD_OSS_FAIL.getMessage() , ErrorCode.UPLOAD_OSS_FAIL.getMessage(),new Object[] { filename });
        this.filepath = filepath;
        this.extension = extension;
        this.filename = filename;
        log.info("OSS上传 文件[" + filename + "]   路径=[" + filepath + "] 后缀[" + extension + "]不正确");
    }

}
