/* ===================================================================
 * EatProcessingException.java
 * 
 * Created Oct 1, 2004 8:07:17 AM
 * 
 * Copyright (c) 2004 Matt Magoffin (spamsqr@msqr.us)
 * 
 * This program is free software; you can redistribute it and/or 
 * modify it under the terms of the GNU General Public License as 
 * published by the Free Software Foundation; either version 2 of 
 * the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License 
 * along with this program; if not, write to the Free Software 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 
 * 02111-1307 USA
 * ===================================================================
 * $Id: EatProcessingException.java 23 2009-05-03 22:59:25Z msqr $
 * ===================================================================
 */

package magoffin.matt.ieat;

/**
 * Runtime exception thrown to signify a process completed, but some
 * error still occured.
 * 
 * @author Matt Magoffin (spamsqr@msqr.us)
 * @version $Revision: 23 $ $Date: 2009-05-04 10:59:25 +1200 (Mon, 04 May 2009) $
 */

public class EatProcessingException extends RuntimeException {
	
	private static final long serialVersionUID = 3257008748156237876L;

	private Object result;
	
	/**
	 * Construct with nested exception.
	 * 
	 * @param thr the nested exception
	 */
	public EatProcessingException(Throwable thr) {
		this(null,null,thr);
	}

	/**
	 * Construct with a result object and nested exception.
	 * 
	 * @param result a processing result object
	 * @param thr the nested exception
	 */
	public EatProcessingException(Object result, Throwable thr) {
		this(result,null,thr);
	}

	/**
	 * Construct with a result object and message.
	 * 
	 * @param result a processing result object
	 * @param msg the message
	 */
	public EatProcessingException(Object result, String msg) {
		this(result,msg,null);
	}

	/**
	 * Construct with a result object, message, and nested exception.
	 * 
	 * @param result a processing result object
	 * @param msg the message
	 * @param thr the nested exception
	 */
	public EatProcessingException(Object result, String msg, Throwable thr) {
		super(msg,thr);
		this.result = result;
	}

	/**
	 * Get the processing result object.
	 * 
	 * @return processing result object
	 */
	public Object getProcessResult() {
		return result;
	}
}
