package cn.iocoder.yudao.framework.common.exception;

import cn.iocoder.yudao.framework.i18n.core.I18nMessage;

/**
 * @author Administrator
 */
public class CmsException extends Exception {
	
	private static final long serialVersionUID = 2415656102753230136L;
	
	private String code;
	private String message;
	private String reason;

	public CmsException() {
		super();
	}

	public CmsException(String code, String message, String reason) {
		super(message);
		this.code = code;
		this.message = message;
		this.reason = reason;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Override
	public String getMessage() {
		return I18nMessage.getMessage(message);
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

}
