pragma exception_init

Dúvidas, dicas e truques de PL/SQL. Aqui também vão assuntos relacionados a pacotes, triggers, funções, Java-Stored Procedures, etc
  

Poston Fri, 10 Mar 2006 8:05 am

ANYONE KNOW HOW IT WORKS. I SAW IN A PROCEDURE AND NOT UNDERSTAND ..! :?:
mello
Location: sp

Poston Fri, 10 Mar 2006 1:53 pm

With exception_init you pragma can define a certain type of error with an exception that you created.

Like, let's say you want to capture the NO_DATA_FOUND, you can create an exception called \"SEM_NADA\" and associate the NO_DATA_FOUND for you treat.

Below, an example: (in this case, it associates the exception achei_deadlock (created by you) with Oracle Error 60.
Code: Select all
DECLARE
   achei_deadlock EXCEPTION;
   PRAGMA EXCEPTION_INIT(achei_deadlock, -60);
BEGIN
   ...
EXCEPTION
   WHEN achei_deadlock THEN
      -- trata o erro...
   ...
END;
If you want to read more, the GURU Tom Kite has some examples: http://asktom.oracle.com/pls/ask/f?p=49 ... 12348047:-
dr_gori
Location: Portland, OR USA

Thomas F. G

Você já respondeu a dúvida de alguém hoje?
http://glufke.net/oracle/search.php?search_id=unanswered

Poston Tue, 14 Mar 2006 11:20 am

Mello, it serves to inform the database that you will exbir a custom message instead of the default message or the default exception which Oracle launches.

http://thespoke.net/blogs/mauriciogonza ... 44870.aspx [] 's
MuLtAnI
Location: Videira - SC




Return to PL/SQL

Who is online

Users browsing this forum: Google [Bot] and 7 guests