甲骨文顶点。是否可以忽略错误过程?
Oracle Apex. Is it possible to Ignore Process on Error?
如果某个进程不起作用,是否可以忽略该进程?
当用户单击我页面上的“创建”按钮时,我有一个发送电子邮件的过程。但问题是出于安全原因,我每天最多可以发送 50 封电子邮件。如果用户超过 50 封电子邮件,此过程会显示错误并停止。所以我无法保存新记录。是否可以错误忽略此过程并继续保存新记录?
创建一个“当其他人”时将忽略任何错误的异常
例如
declare
l_id number;
begin
l_id := apex_mail.send(
p_to => 'fred@flintstone.com',
p_from => 'barney@rubble.com',
p_subj => 'APEX_MAIL with attachment',
p_body => 'Please review the attachment.',
p_body_html => '<b>Please</b> review the attachment');
for c1 in (select filename, blob_content, mime_type
from apex_application_files
where id in (123,456)) loop
apex_mail.add_attachment(
p_mail_id => l_id,
p_attachment => c1.blob_content,
p_filename => c1.filename,
p_mime_type => c1.mime_type);
end loop;
commit;
exception
when others
then
rollback;
null;
end;
如果某个进程不起作用,是否可以忽略该进程?
当用户单击我页面上的“创建”按钮时,我有一个发送电子邮件的过程。但问题是出于安全原因,我每天最多可以发送 50 封电子邮件。如果用户超过 50 封电子邮件,此过程会显示错误并停止。所以我无法保存新记录。是否可以错误忽略此过程并继续保存新记录?
创建一个“当其他人”时将忽略任何错误的异常
例如
declare
l_id number;
begin
l_id := apex_mail.send(
p_to => 'fred@flintstone.com',
p_from => 'barney@rubble.com',
p_subj => 'APEX_MAIL with attachment',
p_body => 'Please review the attachment.',
p_body_html => '<b>Please</b> review the attachment');
for c1 in (select filename, blob_content, mime_type
from apex_application_files
where id in (123,456)) loop
apex_mail.add_attachment(
p_mail_id => l_id,
p_attachment => c1.blob_content,
p_filename => c1.filename,
p_mime_type => c1.mime_type);
end loop;
commit;
exception
when others
then
rollback;
null;
end;