How we difine user defined Exceptions in PL/SQL(Oracle)?

How we difine user defined Exceptions in PL/SQL(Oracle)?
It's very simple to define,for that i am giving one simple examle..
DECLARE
a NUMBER;
b VARCHAR2(10);
BEGIN
EXCEPTION
WHEN No_data_found THEN
dbms_output.put_line('Data not found');
WHEN Dul_value_on_index THEN
dbms_output.put_line('Inserting duplicate record');
WHEN Too_many_rows THEN
dbms_output.put_line('Too many values selected');
WHEN zero_devide
dbms_output.put_line('Deviding with ZERO');
WHEN Others THEN
dbms_output.put_line('Othere Error'||SQLERRM);
END;

No comments: