CREATE OR REPLACE FUNCTION triangle(a number,b number,c number) RETURN boolean AS invalid_triangle exception;
BEGIN IF NOT (a+b>=c
AND b+c>=a
AND c+a>=b) THEN RAISE invalid_triangle;
ELSE RETURN TRUE;
END IF;
exception WHEN invalid_triangle THEN dbms_output.put_line('xxxxxx- invalid triangle -xxxxxxxxxx');
RETURN FALSE;
WHEN others THEN dbms_output.put_line('un identified error occured');
END;
/
DECLARE a number:=&side1;
b number:=&side2;
c number:=&side3;
x boolean;
BEGIN x:=triangle(a,b,c);
END;
/