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

com.gitee.apanlh.exp.CustomException Maven / Gradle / Ivy

There is a newer version: 2.0.0.2
Show newest version
package com.gitee.apanlh.exp;

import com.gitee.apanlh.util.base.StringUtils;

/**
 *	自定义异常
 *	
用于自定义描述异常,也可作为业务异常或其他异常使用 * * @author Pan */ public class CustomException extends RuntimeException { private static final long serialVersionUID = 7969344125770715270L; /** * 构造函数 *
指定异常 * * @author Pan * @param e 异常 */ public CustomException(Exception e) { super(e); } /** * 构造函数 *
指定消息 * * @author Pan * @param msg 消息 */ public CustomException(String msg) { this(msg, ""); } /** * 构造函数 *
指定格式化消息 * * @author Pan * @param format 消息 * @param argument 参数 */ public CustomException(String format, Object... argument) { super(StringUtils.format(format, argument)); } /** * 构造函数 *
指定消息及指定异常 * * @author Pan * @param msg 异常 * @param cause 原因异常 */ public CustomException(String msg, Throwable cause) { super(msg, cause); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy