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
Substitution and Instantiation - SQL It shows how NULL might appear in substitution for a parameter of a predicate and how it might thus participate in instantiation of that p

Closing a Cursor The CLOSE statements disable the cursor, and the result set becomes undefined. An illustration of the CLOSE statement as shown: CLOSE c1;

Multiple Assignment- SQL SQL supports multiple assignment to local variables and also applies multiple assignment semantics in SET clauses of UPDATE statements, but does not

(a) What are decision support systems, and what role do they play in the business environment? (b) Data warehousing is defined as "a subject-oriented, integrated, non-volatile c

Tautology - Equivalences Rules: If there Tautologies are not all the time as much easy to note as the one above so than we can use these truth tables to be definite that a sta

Effects of NULL for Table Expression Here's an important distinction between expressions denoting tables and expressions denoting multisets of rows: a table expression cannot

Joining in SQL Joining IS_CALLED and IS_ENROLLED_ON in SQL SELECT * FROM IS_CALLED NATURAL JOIN IS_ENROLLED_ON This is an example of an SQL table expression. I have been

Varrays versus Nested Tables The Nested tables are differing from varrays in the following ways: 1)  Varrays have a maximum size, while nested tables do not. 2)  Varrays are

SQL Functions The PL/SQL uses all the SQL functions involving the following aggregate functions that summarize the whole columns of the Oracle data: GROUPING, AVG, COUNT, STDDE

Task 2 [12 marks] Write the package body for the following package specification (the detailed description of each function and procedure is provided in the appendix below). Place