Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> pl/sql package
Yes.
Define the exceptions in the package header the reference them from Other packages.
create or replace package my_package as
my_public_exception exception;
--
Any other procedure, function package or trigger can now use the exception as follows
Declare
Some_var varchar2(10);
Begin
If some_var is null
then raise my_package.my_public_exception;
--
As you can see you need to be careful with the naming of packages and exceptions or your code will rapidly become difficult to read.
-----Original Message----- From: adoerler_at_acm.org (Andreas Doerler) [mailto:adoerler_at_acm.org] Posted At: Friday, September 11, 1998 11:04 AM Posted To: misc Conversation: pl/sql package Subject: pl/sql package hi, can i define a package with (package-)global exceptions? <ad>Received on Mon Sep 14 1998 - 13:52:22 CDT
![]() |
![]() |