Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> pl/sql package

pl/sql package

From: John Harris <jharri_at_sapient.com>
Date: Mon, 14 Sep 1998 14:52:22 -0400
Message-ID: <0685A427A719D11197BB00A024D399450850C81D@delphi.sapient.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US