import java.io.File;


/**
 * Generate an exception that create the error for the result window
 * 
 * @author 413
 *
 */
public class ErrorException extends Exception
{
	private File file;
	private Boolean file_Exist;
	private int level;
 
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * Constructor without a screen
	 * @param message
	 * @param level
	 */
	public ErrorException(String message, int level)
	{
		super(message);
		file_Exist = false;
		this.setLevel(level);
	}
	
	/**
	 * Constructor with a screen
	 * @param message
	 * @param level
	 * @param file
	 */
	public ErrorException(String message, int level, File file)
	{
		super(message);
		this.file = file;
		file_Exist = true;
		this.setLevel(level);
	}

	/**
	 * get the File of the screen
	 * @return
	 */
	public File getFile()
	{
		return file;
	}
	
	/**
	 * set the file of the screen
	 * @param file
	 */
	public void setFile(File file)
	{
		this.file = file;
	}
	
	/**
	 * return true if a screen file exist
	 * @return
	 */
	public Boolean isFile_Exist()
	{
		return file_Exist;
	}
	
	/**
	 * set if a screen file exist
	 * @param file_Exist
	 */
	public void setFile_Exist(Boolean file_Exist)
	{
		this.file_Exist = file_Exist;
	}
	
	/**
	 * get the danger level
	 * @return
	 */
	public int getLevel()
	{
		return level;
	}

	/**
	 * set the danger level
	 * @param level
	 */
	public void setLevel(int level) {
		this.level = level;
	}        
	
}
