Pre-defined Exceptions Assignment Help

Assignment Help: >> Exceptions - Pre-defined Exceptions

Pre-defined Exceptions:

Predefined exceptions are exceptions which are already defined through Oracle. The following list provides the set of Predefined Exceptions.

Advantages of Exceptions

By using exceptions for error handling has many advantages. Without exception handling, every time a command is issued and execution errors must be checked as given belows:

BEGIN

SELECT ...

-- check for 'no data found' error

SELECT ...

-- check for 'no data found' error

SELECT ...

-- check for 'no data found' error

The Error processing is not clearly divided from normal processing; nor is it robust. If you neglect to code a check then the error goes undetected and is likely to cause other seemingly unrelated errors.

With  exceptions,  errors  can  be  conveniently  handled  without  the  requirement  to  code  multiple checks, as given below:

BEGIN

SELECT ... SELECT ... SELECT...

...

Exception

WHEN NO_DATA_FOUND THEN # this exception catches all 'no data found' errors#

Exceptions improve readability through letting error-handling routines to be isolated. The Error recovery algorithms do not obscure the primary algorithm. An Exception also improves reliability. You need not to worry about checking for an error at every point it may occur. Just add an exception handler to your PL/SQL block. If the exception is ever raised in which block (or any sub-block) you can be sure it will be handled.

824_predefined exception.png

1791_predefined exception1.png

Using Others Zero-Divide
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd