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

com.github.lsqlebai.exception.ApplicationException Maven / Gradle / Ivy

There is a newer version: 0.4.1
Show newest version
package com.github.lsqlebai.exception;

/**
 * 定义应用异常
 *
 * @author yangyc
 * @see AppExceptionInfo
 * @since 2018/08/06
 */
public class ApplicationException extends RuntimeException {

    public ApplicationException(String message) {
        super(new AppExceptionInfo(500, message).toString());
    }

    public ApplicationException(String message, Throwable cause) {
        super(new AppExceptionInfo(500, message).toString(), cause);
    }

    public ApplicationException(int errorCode, String message) {
        super(new AppExceptionInfo(errorCode, message).toString());
    }

    public ApplicationException(int errorCode, String message, Throwable cause) {
        super(new AppExceptionInfo(errorCode, message).toString(), cause);
    }

    public ApplicationException(Exception e) {
        super(new AppExceptionInfo(500, e.getMessage()).toString(), e.getCause());
    }

    public ApplicationException(int errorCode, Exception e) {
        super(new AppExceptionInfo(errorCode, e.getMessage()).toString(), e.getCause());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy