/** 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;
}
} Powered by
GeSHi Syntax Highlighting software.
Author of all (other) material unless otherwise specified:
Loren Segal. Copyright 2005.