exception
when no_data_found then
errno := 1;
errtext := v_notfoundmsg || v_pmsg;
rollback;
when v_exception then
errno := 1;
rollback;
when others then
rollback;
v_errorcode := sqlcode;
v_errormsg := substr(sqlerrm, 1, 200);
errno := 1;
errtext := '入库单审核异常!' || v_pmsg;
pack_wms_pub.sp_wms_insertsperr('入库单审核',
v_errorcode,
v_errormsg);
本文介绍了一个具体的异常处理案例,包括当没有找到数据时的处理、通用异常处理以及其他未预见错误的处理方式。通过PL/SQL代码展示了如何记录错误信息并回滚事务。
133

被折叠的 条评论
为什么被折叠?



