文章出處

EXCEPTION
  when others then
    rollback;
    dbms_output.put_line('code:' || sqlcode);
    dbms_output.put_line('errm:' || sqlerrm);

    raise;
when others then和raise;
分別是什么意思
 
異常分很多種類,如NO_FOUND。others處本應該寫異常名稱,如果不想把異常分得那麼細,可以籠統一點用others來捕獲,即所有異常均用others來捕獲。
when others then表示是其它異常。
raise表示拋出異常,讓User可以看到。
http://blog.csdn.net/myflysun/article/details/7547141

文章列表


不含病毒。www.avast.com
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 大師兄 的頭像
    大師兄

    IT工程師數位筆記本

    大師兄 發表在 痞客邦 留言(0) 人氣()