package com.uas.report.axis;

public class WSException extends Exception {

	private static final long serialVersionUID = 1L;

	public static final int NO_ERROR = 0;
	public static final int GENERAL_ERROR = 1;
	public static final int GENERAL_ERROR2 = 2;
	public static final int REFERENCED_RESOURCE_NOT_FOUND = 3;
	public static final int EXPORT_ERROR = 4;
	public static final int FILL_ERROR = 5;
	public static final int GENERAL_REQUEST_ERROR = 6;

	private int errorCode = 0;

	/** Creates a new instance of WSException */
	public WSException(int code, String message) {
		super(message);
		this.errorCode = code;
	}

	public WSException(Exception e) {
		this(GENERAL_ERROR, e.getMessage());
	}

	public int getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(int errorCode) {
		this.errorCode = errorCode;
	}
}
