Redeclaring predefined exceptions - user-defined exceptions, PL-SQL Programming

Redeclaring Predefined Exceptions

Keep in mind that, the PL/SQL declares predefined exceptions globally in the package STANDARD; Therefore you need not declare them yourself. Re-declaring the predefined exceptions is error prone as your local declaration overrides the global declaration. For illustration, if you declare an exception named invalid_number and then PL/SQL raises the predefined exception INVALID_NUMBER internally, a handler written for the INVALID_ NUMBER will not catch the internal exception. In such situations, you should use dot notation to specify the predefined exception, which is as shown:

EXCEPTION

WHEN invalid_number OR STANDARD.INVALID_NUMBER THEN

-- handle the error

END;

Posted Date: 10/5/2012 5:15:55 AM | Location : United States







Related Discussions:- Redeclaring predefined exceptions - user-defined exceptions, Assignment Help, Ask Question on Redeclaring predefined exceptions - user-defined exceptions, Get Answer, Expert's Help, Redeclaring predefined exceptions - user-defined exceptions Discussions

Write discussion on Redeclaring predefined exceptions - user-defined exceptions
Your posts are moderated
Related Questions
THEORY OF SPONTANEOUS GENERATION - ABIOGENESIS OR AUTOGENESIS - According to this theory, the existing living communities have originated from non-living organic matter with

Advantages of Exceptions Using the exceptions for the error handling has many benefits. Without an exception handling, every time you issue a command, you should ensure for th

1. Create a procedure called TAX_COST_SP to accomplish the tax calculation task. Keep in mind that the state and subtotal values are inputs into the procedure and the procedure is

Great Plains (Microsoft Dynamics) Purchases Report Project Description: I want to build a purchases report that matches the General Ledger. presently, when I join the PM20

Using the BULK COLLECT Clause The keywords BULK COLLECT specify the SQL engine to bulk-bind output collections before returning them to the PL/SQL engine. You can use these ke

Question 1 . Compare SQL and PL/SQL Question 2 . Write a database trigger to implement the following check condition                          Given the following table

Cursors The Oracle uses work areas to execute the SQL statements and to store process information. A PL/SQL construct known as the cursor. Let's you assume name a work area and

Parameter and Keyword Description: label_name: This is an undeclared identifier which optionally labels a loop. When used, the label_name should be enclosed by double ang

The Package Specification The package specifications contain the public declarations. The scopes of these declarations are local to your database representation and global to t

Datatypes Every constant and variable has a datatype that specifies the storage format, constraints, and the valid range of values. The PL/SQL gives a variety of predefined dat