Try to handle the exception of another block, do not get it... Precious need help please...

Hi, fields,

I want to RAISE an exception through my first procedure and want to manage it in the second procedure. [I think it's concept of reproduction or multiplication exception].

Not able to do, need your valuable advice.


create or replace procedure test_excep1 (a number, b number)
is
c number;
external_exception exception;
Start
c: = a / b;
dbms_output.put_line ('Came out' | c);
exception
When zero_divide then
raise external_exception;
end;

Start
test_excep (2,0);
end;

When executing procedure above with divisor of zero, I get the error message below

ORA-06510: PL/SQL: not supported by the user-defined exception
ORA-06512: at "SONARDBO. TEST_EXCEP', line 10
ORA-01476: divisor is equal to zero
ORA-06512: at line 2


Now if I try to catch this exception by another procedure, it does not help me. -This is my exact requirement.


Create procedure test_excep2 (in numbers, number e d)
is
external_exception exception;
Start
test_excep (d, e);
exception when external_exception then
dbms_output.put_line ("' work of exception management");
end;

Start
test_excep2 (2,0);
end;

When running over block, get the message below.

ORA-06510: PL/SQL: not supported by the user-defined exception

ORA-06512: at "SONARDBO. TEST_EXCEP', line 10

ORA-01476: divisor is equal to zero

ORA-06512: at "SONARDBO. TEST_EXCEP2', line 5

ORA-06512: at line 2

Thanks a ton in advance for help.

Everything simply because you called an undefined exception 'external_exception' in a unit of code, and then reuse the name in another--does not mean that the variables of these exceptions are for the same exception. Common names mean nothing in this case. Using the same name for the variables or constants and exceptions across modules/units of code, does not mean that they are now the same.

Tags: Database

Similar Questions

Maybe you are looking for

  • Cloning of an Ipad?

    I have a mini ipad 4 set up quite as much as I want it to be.  Now, I want to put in place a new and transfer the settings and other customization on the second so that it looks like the first.  You is a way to do this? Thank you.

  • HP CSI Shell has stopped working - cannot install the printer driver

    I just bought a printer LaserJet MFP M127fw Pro, but the installation of the pilot program still crashes. I tried 3 different modes of driver installation: the installation CD install HP Smart (USB) and download online, but I keep getting the same er

  • Replacement of the roller cleaner for Toshiba Journe Scan

    Hello I have a Toshiba's Journe Scan I lost the roller cleaner for it. Wondering where I could get a replacement. Or what else can I use to clean the roller is why he leaves no white lines on my pictures. Thank you.

  • Satellite P100-429 - new wireless network card does not work

    Hello I just upgraded my home network to the draft of the standard "n" and thought that I would upgrade my wireless card on my laptop P100-429;Laptop is under Vista Home Premium and has the latest version of BIOS and drivers installed. Laptop current

  • Satellite A100-153: where to get the CD from drive Media Express?

    Hello Sorry I Cana´t speak English, but I'll try to explain my problem maybe someone can help me. I have a toshiba a100-153 with multimedia function. I can watch DVDs without starting windows with Media Player express.My problem is: I installed windo