/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved. <a>http://www.crunii.com</a>
 */
package com.crunii.micro.common.exception;

import com.crunii.micro.common.utils.Slf4jUtil;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author 田平 create 2019年6月3日下午4:28:49
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class BusinessException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	public BusinessException() {

	}
	
	public BusinessException(String message,Throwable e) {
		super(message,e);
	}

	public BusinessException(String message) {
		super(message);
	}

	public BusinessException(String pattern, Object... args) {
		super(Slf4jUtil.formatException(pattern, args));
	}

	public static void main(String[] args) {
		throw new BusinessException("id:{},name:{}", 10000, "Nick", new RuntimeException("abcd12312"));
	}

}
