使用 clob 无法捕获的 regexp_instr 中的异常?
零是非法的,应该是一,但真正的问题是异常不可捕获。它冒泡到顶部并且永远不会打印“抓住它”。 d() 只是写入 dbms 输出。如果我将 clob 更改为 varchar2,则可以捕获该异常。异常无法捕获的事实是一个错误,对吧?例外情况是 ora-01428 参数“0”超出范围。
declare
v int;
p_in clob := 'i think i can init like this';
begin
d('started');
v := regexp_instr(p_in, 'some_regexp', 0);
d('it worked');
exception when others then
d('caught it');
end;
你知道,只知道向公司报告错误应该更像是给公司的一份礼物,而不是对用户的痛苦经历。我花了 30 分钟闲逛,试图创建一个帐户并输入一个 Oracle 错误,多次输入相同的内容。忘了它。接吻发生了什么。匿名错误怎么样?来吧,甲骨文。
The zero is illegal, should be a one, but the real problem is that the exception is not catchable. It bubbles to top and "caught it" is never printed. The d()'s just write to dbms output. The exception is catchable if i change the clob to a varchar2. The fact that the exception is uncatchable is a bug right? The exception is ora-01428 argument '0' is out of range.
declare
v int;
p_in clob := 'i think i can init like this';
begin
d('started');
v := regexp_instr(p_in, 'some_regexp', 0);
d('it worked');
exception when others then
d('caught it');
end;
ya know, just know reporting a bug to a company should feel like more of a gift to the company not a torturous experience to the user. 30 minutes i goofed around trying to create an account and enter an oracle bug, entering same stuff multiple times. forget it. what happened to kiss. how about anonymous bugs. cmon oracle.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Oracle XE (10.2.0.1) 中,以下错误在第 1 行出现未处理的异常,
因为它位于第 1 行,所以它甚至无法进入声明部分,因此不会被异常处理程序捕获
。在第 5 行并
捕获错误。
=================================================== =======================
附言。看起来问题归结为 STANDARD。REGEXP_INSTR
指示两个过程,一个用于 VARCHAR2,一个用于 CLOB。 CLOB 具有 NUMBER/INTEGER 作为 POSITION 参数,而 VARCHAR2 具有 BINARY_INTEGER/PLS_INTEGER。我猜想 PLS_INTEGER 不够大,无法容纳非常大的千兆字节 CLOB 等的值。
In Oracle XE (10.2.0.1), the following fails with an unhandled exception at line 1
Because it is at line 1, it can't even enter the declare section, so it isn't getting caught be the exception handler..
errors at line 5 and
catches the error.
=========================================================================
PS. It looks like the issue is down to STANDARD.REGEXP_INSTR
indicates two procedures, one for VARCHAR2 and one for CLOB. The CLOB one has a NUMBER/INTEGER as the POSITION parameter while the VARCHAR2 has a BINARY_INTEGER/PLS_INTEGER. I guess the PLS_INTEGER isn't big enough to hold the a value for a very large CLOB of gigabytes etcs.