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
How do I display usernames for students from a student table, assigning each student a username initials001 (initials is the actual student initials), and if the students initials

Parameter and Keyword Description: cursor_variable_name: This identifies a cursor variable or the parameter formerly declared within the present scope. host_cursor_va

Bitmap Join Indexes - This feature will increase the performance and detains the size and format of your databases in data Character Semantics and Globalization -This featur

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

write the program for traffic control system with 10 second, 15 secod, and 20 second delay

LIKE Operator You use the LIKE operator to compare the character value to a pattern. The Case is significant. LIKE returns the Boolean value TRUE when the character patterns mat

Manipulating Collections Within PL/SQL, the collections add procedural power and flexibility. The biggest benefit is that your program can compute subscripts to process the spec

Problem: (a) Define the following terms: (i) data mining. (ii) OLAP. (b) Differentiate between snowflake schema and star schema. Support your answer with appropriate

Write a query to find academics that are authors and that have only ever coauthored papers with authors from institutes in the same state as their own. List their academic number,

Use the NOCOPY Compiler Hint By default, the OUT and IN OUT parameters are passed by the value i.e. the value of an IN OUT actual parameter is copied into the corresponding fo