代码太大了,我就把主要流程说一下:
CREATE PROCEDURE
....
BEGIN
....
begin
...
exception
when others then
insert into sql_error
values(错误信息);
commit;
end;begin
...
procedure1;
...
exception
when others then
insert into sql_error values(错误信息);
commit;
end;
...
EXCEPTION
when others then
insert into sql_error values(错误信息);
commit;
END;程序大致是这样的,在执行一半时出错了,我查看sql_error也没有看到有关的错误信息,很郁闷。
CREATE PROCEDURE
....
BEGIN
....
begin
...
exception
when others then
insert into sql_error
values(错误信息);
commit;
end;begin
...
procedure1;
...
exception
when others then
insert into sql_error values(错误信息);
commit;
end;
...
EXCEPTION
when others then
insert into sql_error values(错误信息);
commit;
END;程序大致是这样的,在执行一半时出错了,我查看sql_error也没有看到有关的错误信息,很郁闷。
另外一个可能的原因是在声明部分就出现了异常,这样你在本层中定义的任何异常处理块就失去作用,因为这个异常会马上被抛到外层。