oracle的用户自定义异常

declare

  a number :='&args';

   e exception;

 begin

   if a=then

    raise e; --raise 抛出异常

   end if; 

exception

  when e then

    dbms_output.put_line('a不能为1'); 

  when others then

    dbms_output.put_line('#########'); 

end;

原文地址:https://www.cnblogs.com/xuhewei/p/9243937.html