Exception propagation problem

From: Tim <megatim_at_techie.com>
Date: 18 Jun 2002 02:46:16 -0700
Message-ID: <91b8895f.0206180146.14cae767_at_posting.google.com>


PROCEDURE ...
BEGIN
  INSERT ...   BEGIN
    SELECT col INTO variable
    FROM tbl
    WHERE col = 'a';

    RAISE_APPLICATION_ERROR (-20100,' ');   EXCEPTION
    WHEN NO_DATA_FOUND THEN

      INSERT INTO tbl
      VALUES (...);

  END; EXCEPTION
  WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR (-20101,' '); END; Problem: Inside the sub-block, the RAISE_APPLICATION_ERROR never executes. Even if the "SELECT col ..." returns a valid result, the outer exception (WHEN OTHERS ...) is called straight away. The RAISE_APPLICATION_ERROR (-20100,' ') is never called. What I am doing wrong?

Thanks,
Tim Received on Tue Jun 18 2002 - 11:46:16 CEST

Original text of this message