Viewing file: comp249/assignment3/MovieException.java | Back to directory listing
Author: Loren Segal | Last modified: February 21 2006 12:00 am | Download

/** A MovieException is an Exception grouping for all the possible
  * exceptions that can be raised when validating the database file
  */
public class MovieException extends Exception
{
	private String type;
	private String invalidData;
 
	public MovieException(String newType, String newInvalidData)
	{
		super(newType + ": " + newInvalidData);
		setType(newType);
		setInvalidData(newInvalidData);
	}
 
	// ***********************************************************
	// GET/SET METHODS For the exception type and the invalid data
	// ***********************************************************
 
	public String getType()
	{
		return type;
	}
 
	public String getInvalidData()
	{
		return invalidData;
	}
 
	public void setType(String newType)
	{
		type = newType;
	}
 
	public void setInvalidData(String newInvalidData)
	{
		invalidData = newInvalidData;
	}
}