package com.tandbergtv.watchpoint.pmm.assetlist;

/**
 * Represents a runtime exception when operating on an asset list. The exact reason is identified 
 * by the error code contained in the exception.
 * 
 * @author spuranik
 * 
 */
public class AssetListRuntimeException extends RuntimeException {

	private static final long serialVersionUID = -6505083550807576806L;
	
	private AssetListErrorCode code;

	public AssetListRuntimeException(AssetListErrorCode code) {
		super();
		this.code = code;
	}

	public AssetListRuntimeException(String message, AssetListErrorCode code) {
		super(message);
		this.code = code;
	}
	
	public AssetListRuntimeException(Throwable cause, AssetListErrorCode code) {
		super(cause);
		this.code = code;
	}

	/**
	 * @return the code
	 */
	public AssetListErrorCode getCode() {
		return code;
	}
}
