Home » SQL & PL/SQL » SQL & PL/SQL » How to pass the error ?
How to pass the error ? [message #193788] Tue, 19 September 2006 07:22 Go to next message
jai_162
Messages: 21
Registered: July 2006
Junior Member
Hi ,

How to pass the error from inner Exception block to outer Exception block?

Eg:
begin
For Loop
Inner Exception
End Loop;
Outer Exception
end;
Re: How to pass the error ? [message #193790 is a reply to message #193788] Tue, 19 September 2006 07:31 Go to previous messageGo to next message
Liza79
Messages: 74
Registered: September 2006
Member
just don't handle it in the inner exception part. It will automatically be raised to the outer one.
Re: How to pass the error ? [message #193791 is a reply to message #193788] Tue, 19 September 2006 07:32 Go to previous message
aorehek
Messages: 52
Registered: August 2006
Member
BEGIN
  FOR i IN 1.. 10 LOOP
    BEGIN
       code
    EXCEPTION
      WHEN OTHERS THEN
         -- put som code in here 
         RAISE;
    END;   
  END LOOP;
EXCEPTION
  WHEN NO_DATA_FOUND THEN ....
  WHEN TOO_MANY_ROWS THEN ....
  WHEN OTHERS  THEN ...
    RAISE; -- go to next error_handler...
END;    
Previous Topic: select distinct top 5 sal
Next Topic: Distinct within a procedure
Goto Forum:
  


Current Time: Sun Dec 04 14:42:58 CST 2016

Total time taken to generate the page: 0.07174 seconds