package com.iformall.exception;

import com.iformall.common.ErrorCode;

/**
 * Created by Stormeye on 2018/8/10.
 */
public class MallinkException extends RuntimeException {

	private int errorCode;
	private String message;

	public MallinkException(int errorC, String message) {
		this.errorCode = errorC;
		this.message = message;
	}

	public MallinkException(ErrorCode errCode) {
		this.errorCode = errCode.getCode();
		this.message = errCode.getMessage();
	}

	public MallinkException() {
		super();
	}

	public int getErrorCode() {
		return errorCode;
	}

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

}
