/* program Test_Excep2.java creating Exception classes */
class RangeError extends Exception {
	RangeError(String s) { super(s); }
	}	


class Test_Excep2 {
	public static void main(String[] args) {
	  int	first, second, sum;

	  try {
		first = Integer.parseInt(args[0]);
		second = Integer.parseInt(args[1]);
		
		sum = process(first,second);
		System.out.println("sum = " + sum);
	  }
	  catch (RangeError e) {
		System.out.println(e);
	  }
	}

	static int process(int x, int y) throws RangeError { 
	  if((x < 0) || (y <0))
		 throw new RangeError("Less than zero");
	  return x + y;
	  }
}


