Return-Path: <oracle-l-bounce@freelists.org>
X-Original-To: oracle-l@orafaq.com
Delivered-To: oracle-l@orafaq.com
Received: from smtp-aa.freelists.org (smtp-aa.freelists.org [23.23.80.81])
 by malta2546.startdedicated.com (Postfix) with ESMTPS id 4BA4D1002BF02F
 for <oracle-l@orafaq.com>; Sun, 17 Oct 2021 08:58:05 +0200 (CEST)
Received: from turing.freelists.org (ip-10-0-0-164.ec2.internal [10.0.0.164])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by smtp-aa.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 866BF405F5;
 Sun, 17 Oct 2021 06:58:02 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Postfix) with ESMTP id 6F0203F7BA;
 Sun, 17 Oct 2021 06:58:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1634453882;
 bh=oQecAc/iEg88SOnqnw6Lz3FOwAd+D7xiCdGNtNYB2W4=;
 h=From:Sender:Sender:From;
 b=GrYnrY3IVNDllMKhyOOBR6+M28EOXFV6lMdHBVFLZN2GCrWv7sah+1pEVeb3lW9XW
	 /vNS/xJjO5QyElY+9RtfIIEQLY8NtCcqD+IUcwJWSHxHMJwmilv4hODbAESO50AmIN
	 1gudVFT+Fw/hB584QhBVRoV1F0UpJQhenDPHXtBA=
X-Virus-Scanned: by FreeLists at turing.freelists.org
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id UUatUCT6Ir3t; Sun, 17 Oct 2021 06:58:02 +0000 (UTC)
Received: from turing.freelists.org (localhost [127.0.0.1])
 by turing.freelists.org (Postfix) with ESMTP id 89B3C3F7BB;
 Sun, 17 Oct 2021 06:57:59 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1634453880;
 bh=oQecAc/iEg88SOnqnw6Lz3FOwAd+D7xiCdGNtNYB2W4=;
 h=From:Sender:Sender:From;
 b=QFrpusBERkh9hiHpJ4JdkRaOJX2eX76jJ7VxCHSJcXbbMmgoqqf/mSiwVytPYOCP8
	 ZKDAM+H2hjpb432G3xKAs+cDm12EfQYdrPfjhZIUmYp8SPwPcUD9oqur/I2affAT+t
	 Top3YNlI4ZT4H8i8wiJeMuka57nsArTKMqTZReuo=
Received: with ECARTIS (v1.0.0; list oracle-l); Sun, 17 Oct 2021 06:57:57 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Postfix) with ESMTP id D12C23F7B9
 for <oracle-l@freelists.org>; Sun, 17 Oct 2021 06:57:57 +0000 (UTC)
Authentication-Results: turing.freelists.org;
 dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=lfxZocnb;
 dkim-atps=neutral
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id A6vn7Lq3cJ9n for <oracle-l@freelists.org>;
 Sun, 17 Oct 2021 06:57:57 +0000 (UTC)
Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by turing.freelists.org (Postfix) with ESMTPS id BE8C43F7B8
 for <oracle-l@freelists.org>; Sun, 17 Oct 2021 06:57:57 +0000 (UTC)
Received: by mail-qk1-f176.google.com with SMTP id a13so2862135qkg.11
        for <oracle-l@freelists.org>; Sat, 16 Oct 2021 23:57:57 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20210112;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to;
        bh=6wti9dvuROYuWNH25pJ+3y0LK6XUV8mhpCnOalX02Y8=;
        b=yiwkMNRGerysjhGFu19q0esovUX4L3D9aydtxWAP06/akeRupC9NyJLzAeAtE/+qyc
         BxbHqAVL4yf1Hxxqv+9x1q7YowsEuLTOtv9M2RpkRqMcBk8HQAehKcXcFk1rwPe3o82k
         XPwbkVyOgYoiy6ekbKKKTfApKDenbMlP93TTI+GR7dLKDi4cjg9ZOTLMBgqLs1KYlBN1
         cd+0QlsuVjiKX6JkIISMmMttujlURSwFDkwVOHAi1bJWZkIzIb/DtFQH4aFdEq3AFf8E
         pAL1ywmKVe8ni+hPpc6KsMskq0CLrZQxdO3uhb6Vm45Zb2UUOFBSw6NgRUroBbc0c4Ed
         8D0g==
X-Gm-Message-State: AOAM532IgipDp0KIqjL83vaQKIdxtmZM/wlmMlSGvCiigarf6X3DD9gx
 7Bhs/VdVY878s3pBhi2Xx6DNhsdR9jKsnSNfEuWcobXtA/4=
X-Google-Smtp-Source: ABdhPJyxZF6meo9jixUEh4MJBZ8/MM/08+A6uibaWIc0mlH21WpUwO2VoSBPjFKqFUeT7Fy2izx64h+qqs8APeGd0TY=
X-Received: by 2002:a37:34a:: with SMTP id 71mr17067267qkd.242.1634453877143;
 Sat, 16 Oct 2021 23:57:57 -0700 (PDT)
MIME-Version: 1.0
References: <CABpiuuRGHX51vsuwrmS4saa+dj=Rq0gc4Y+bzUVo0-OFT=wmxA@mail.gmail.com>
 <CABpiuuQznpWiFU6EAYLXyYy8sz1cMjHiHVBARNDVmS5iMyp0dw@mail.gmail.com>
In-Reply-To: <CABpiuuQznpWiFU6EAYLXyYy8sz1cMjHiHVBARNDVmS5iMyp0dw@mail.gmail.com>
From: Jonathan Lewis <jlewisoracle@gmail.com>
Date: Sun, 17 Oct 2021 07:57:45 +0100
Message-ID: <CAGtsp8mUYKZk5bfPQ3adZ+giA+h83guf7dEJphv0bp6hKLvKag@mail.gmail.com>
Subject: Re: Don't sure whether it's a bug for raising an exception manually?
To: Oracle L <oracle-l@freelists.org>
Content-Type: multipart/alternative; boundary="000000000000bfbab205ce86f220"
X-archive-position: 81167
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: jlewisoracle@gmail.com
Precedence: normal
Reply-To: jlewisoracle@gmail.com
List-Help: <mailto:ecartis@freelists.org?Subject=help>
List-Unsubscribe: <mailto:oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-Subscribe: <mailto:oracle-l-request@freelists.org?Subject=subscribe>
List-Owner: <mailto:>
List-post: <mailto:oracle-l@freelists.org>
List-Archive: <https://www.freelists.org/archive/oracle-l>
X-list: oracle-l
--000000000000bfbab205ce86f220
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

In your exception clause you've handled the error (ctas_error) so the error
exists no more and the trigger code can complete successfully.

If you want an error to be passed on upwards (i.e. for the trigger to fail)
you have to raise another exception; typically you do this with the key
word "raise;" though sometimes people will (as you have done in the first
version of the code) "raise_application_error(......)" with some text that
you think is more informative that the internal Oracle error message.

Regards
Jonathan Lewis



On Sun, 17 Oct 2021 at 02:47, Quanwen Zhao <quanwenzhao@gmail.com> wrote:

>
>
> ---------- Forwarded message ---------
> =E5=8F=91=E4=BB=B6=E4=BA=BA=EF=BC=9A Quanwen Zhao <quanwenzhao@gmail.com>
> Date: 2021=E5=B9=B410=E6=9C=8816=E6=97=A5=E5=91=A8=E5=85=AD =E4=B8=8B=E5=
=8D=886:26
> Subject: Don't sure whether it's a bug for raising an exception manually?
> To: <oracle-l@freelists.org>
>
> *exception*
>> *  when ctas_err then*
>> *    dbms_output.put_line('Do not allow to CTAS big table ' || t_name ||
>> ' without keyword nologging.');*
>> end;
>> /
>>
>
>
>

--000000000000bfbab205ce86f220
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div><br></div><div>In your exception cla=
use you&#39;ve handled the error (ctas_error) so the error exists no more a=
nd the trigger code can complete successfully.</div><div><br></div><div>If =
you want an error to be passed on upwards (i.e. for the trigger to fail) yo=
u have to raise another exception; typically you do this with the key word =
&quot;raise;&quot; though sometimes people will (as you have done in the fi=
rst version of the code) &quot;raise_application_error(......)&quot; with s=
ome text that you think is more informative that the internal Oracle error =
message.</div><div><br></div><div>Regards</div><div>Jonathan Lewis</div><di=
v><br></div><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D=
"ltr" class=3D"gmail_attr">On Sun, 17 Oct 2021 at 02:47, Quanwen Zhao &lt;<=
a href=3D"mailto:quanwenzhao@gmail.com">quanwenzhao@gmail.com</a>&gt; wrote=
:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"lt=
r"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr"=
>---------- Forwarded message ---------<br>=E5=8F=91=E4=BB=B6=E4=BA=BA=EF=
=BC=9A <b class=3D"gmail_sendername" dir=3D"auto">Quanwen Zhao</b> <span di=
r=3D"auto">&lt;<a href=3D"mailto:quanwenzhao@gmail.com" target=3D"_blank">q=
uanwenzhao@gmail.com</a>&gt;</span><br>Date: 2021=E5=B9=B410=E6=9C=8816=E6=
=97=A5=E5=91=A8=E5=85=AD =E4=B8=8B=E5=8D=886:26<br>Subject: Don&#39;t sure =
whether it&#39;s a bug for raising an exception manually?<br>To:  &lt;<a hr=
ef=3D"mailto:oracle-l@freelists.org" target=3D"_blank">oracle-l@freelists.o=
rg</a>&gt;<br></div><br><div dir=3D"ltr"><div style=3D"color:rgb(0,0,0);fon=
t-family:&quot;lucida Grande&quot;,Verdana,&quot;Microsoft YaHei&quot;;font=
-size:14px"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><b><font=
 style=3D"line-height:23.8px" color=3D"#ff0000">exception</font></b></div><=
div><b><font style=3D"line-height:23.8px" color=3D"#ff0000">=C2=A0 when cta=
s_err then</font></b></div><div><b><font style=3D"line-height:23.8px" color=
=3D"#ff0000">=C2=A0 =C2=A0 dbms_output.put_line(&#39;Do not allow to CTAS b=
ig table &#39; || t_name || &#39; without keyword nologging.&#39;);</font><=
/b></div><div>end;</div><div>/</div></blockquote><div><br></div><br></div><=
/div>
</div></div>
</blockquote></div></div>

--000000000000bfbab205ce86f220--
--
http://www.freelists.org/webpage/oracle-l


