
//--------------------------------------------------------------------
// Class RequestFailException
//
// Purpose  : handle FileAlreadyExistException
//--------------------------------------------------------------------

public class RequestFailException extends Exception
{
   public RequestFailException(String reason)
   {
	   super(reason);
   }
}


//--------------------------------------------------------------------
// Class FileAlreadyExistException
//
// Purpose  : handle FileAlreadyExistException
//--------------------------------------------------------------------

class FileAlreadyExistException extends Exception
{
   public FileAlreadyExistException(String fileName)
   {
	   super(fileName + " already exists.");
   }
}


//--------------------------------------------------------------------
// Class FileNotExistException
//
// Purpose  : handle FileNotExistException
//--------------------------------------------------------------------

class FileNotExistException extends Exception
{
   public FileNotExistException(String fileName)
   {
	   super(fileName + " not exists.");
   }
}


//--------------------------------------------------------------------
// Class NotEnoughSpaceException
//
// Purpose  : handle NotEnoughSpaceException
//--------------------------------------------------------------------

class NotEnoughSpaceException extends Exception
{
   public NotEnoughSpaceException(int noOfBlocks, int noOfFreeBlocks)
   {
	   super("requested blocks = " + Integer.toString(noOfBlocks)
				+ ", free blocks = " + Integer.toString(noOfFreeBlocks));
   }
}


//--------------------------------------------------------------------
// End Class RequestFailException
//--------------------------------------------------------------------