package com.uas.eis.exception;

import com.uas.eis.entity.ErrorMsg;
import com.uas.eis.sdk.entity.ApiResult;

/**
 * 系统程序执行异常
 * 
 * @author yingp
 * 
 */
public class SystemException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4218425517031998401L;
	
	private ErrorMsg errorMsg;

	private ApiResult apiResult;

	public SystemException() {
	}

	public SystemException(String paramString) {
		super(paramString);
	}
	
	public SystemException(ErrorMsg errorMsg) {
		super(errorMsg.getErrDesc());
		this.errorMsg = errorMsg;
	}
	public SystemException(ErrorMsg errorMsg, Throwable paramThrowable) {
		super(errorMsg.getErrDesc(), paramThrowable);
		this.errorMsg = errorMsg;
	}
	public SystemException(ApiResult apiResult) {
		super(apiResult.getMessage());
		this.apiResult = apiResult;
	}
	public SystemException(ApiResult apiResult, Throwable paramThrowable) {
		super(apiResult.getMessage(), paramThrowable);
		this.apiResult = apiResult;
	}
	public SystemException(Throwable paramThrowable) {
		super(paramThrowable);
	}

	public ErrorMsg getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(ErrorMsg errorMsg) {
		this.errorMsg = errorMsg;
	}

	public ApiResult getApiResult() {
		return apiResult;
	}

	public void setApiResult(ApiResult apiResult) {
		this.apiResult = apiResult;
	}
}
