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

cn.featherfly.common.exception.ExceptionCodeException Maven / Gradle / Ivy

There is a newer version: 1.7.12
Show newest version
package cn.featherfly.common.exception;

import java.util.Locale;

/**
 * 

* ExceptionCodeException *

* * @author zhongj * @since 1.7 * @version 1.7 */ public abstract class ExceptionCodeException extends LocalizedException { private static final long serialVersionUID = 5710245517160140690L; private ExceptionCode exceptionCode; /** * 构造方法 * */ protected ExceptionCodeException() { } /** * 构造方法 * * @param exceptionCode * 错误码 */ protected ExceptionCodeException(ExceptionCode exceptionCode) { super(exceptionCode.getMessage()); this.exceptionCode = exceptionCode; } /** * 构造方法 * * @param exceptionCode * 错误码 * @param ex * 异常 */ protected ExceptionCodeException(ExceptionCode exceptionCode, Throwable ex) { super(exceptionCode.getMessage(), ex); this.exceptionCode = exceptionCode; } /** * 构造方法 * * @param exceptionCode * 错误码 * @param args * 消息文本绑定参数 */ protected ExceptionCodeException(ExceptionCode exceptionCode, Object[] args) { super(exceptionCode.getMessage(), args); this.exceptionCode = exceptionCode; } /** * 构造方法 * * @param exceptionCode * 错误码 * @param locale * locale */ protected ExceptionCodeException(ExceptionCode exceptionCode, Locale locale) { super(exceptionCode.getMessage(), locale); this.exceptionCode = exceptionCode; } /** * 构造方法 * * @param exceptionCode * 错误码 * @param args * 消息文本绑定参数 * @param locale * locale */ protected ExceptionCodeException(ExceptionCode exceptionCode, Object[] args, Locale locale) { super(exceptionCode.getMessage(), args, locale); this.exceptionCode = exceptionCode; } /** * 构造方法 * * @param exceptionCode * 错误码 * @param args * 消息文本绑定参数 * @param locale * locale * @param ex * 异常 */ protected ExceptionCodeException(ExceptionCode exceptionCode, Object[] args, Locale locale, Throwable ex) { super(exceptionCode.getMessage(), args, locale, ex); this.exceptionCode = exceptionCode; } /** * 返回exceptionCode * * @return exceptionCode */ public ExceptionCode getExceptionCode() { return exceptionCode; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy