Which type of exceptions is qualified as no predefined Oracle server errors?

Which type of exceptions is qualified as no predefined Oracle server errors?

Which type of exceptions is qualified as no predefined Oracle server errors?

A.
the exceptions that are explicitly raised by the program and can be caught by the exception handler

B.
the exceptions that are raised implicitly by the Oracle server and can be caught by the exception handler

C.
an exception that the developer determines as abnormal, are in the declarative section and raised explicitly

D.
an exception that is raised automatically when the PL/SQL program violates a database rule or exceeds a system-dependent limit



Leave a Reply 33

Your email address will not be published. Required fields are marked *


bala

bala

C i right
see this link (http://www.oracletutorialz.blogspot.in/) in that
implicitly.

3) EXCEPTION TYPE : User Defined Errors
DESCRIPTION : It is any condition that the developer determines, which is abnormal.
HANDLING TIP : Declare with in the Declarative Section and Raise Explicitly.

ankur

ankur

Answer should be B.
C is user defined exception scenario.
Non predefined exceptions are raised implicitely by oracle. Non predefined exceptions are standard oracle exceptions and can be associated with a error-name by PRAGMA EXCEPTION_INIT directive.

ankur

ankur

I guess in the question text the ‘no predefined’ means non predefined exception

santoshi

santoshi

b is answer

DV

DV

An error is different from an exception. No predefined oracle error means user defined exception. In fact , there is no much difference between A&C, or B&D.

DV

DV

Please provide any evidence if exits

Nishant

Nishant

Non-Predefined exceptions are exceptions implicitly raised by Oracle like “ORA-2292 , ORA-2293” but that do not have a name (like NO_ROWS_FOUND).

These can be caught in exception handler by attaching a new to these exceptions by defining an exception object type and by using PRAGMA EXCEPTION_INIT(excp, oranum).

Answer should be B

sanyo

sanyo

You are correct. Answer should be B.

S!d

S!d

I also thought B is right answer, marked in my exam but it turned out to be fatal. This leaves me thinking that D can be the only correct option as i was confused between options B & D.

C is wrong as this is case of user defined exception.
A is wrong as non predefined oracle error are raised implicitly and not explicitly.

Paul

Paul

Hi Guys

I think the answer may be C

The central issue here is how the question is written. I think the phrase “no predefined Oracle server errors” could mean basically what in the list is not any type of predefined error, in other words a User-defined error. It tricky wording and I think it would confuse most people.

See “Exception types” in http://docs.oracle.com/cd/E11882_01/timesten.112/e21639/exceptions.htm#TTPLS194

c.v.kumar

c.v.kumar

exception type:

1) predefined exception (is managed by oracle server & raised implicity );

2) non predefined exception (declare with declare section & raise implicity);

3)user defined exception ( declare with declare section & raise statement raised explicity);

so above question no predefined oracle server error.

so user defined exception

s.l.

s.l.

D – it’s predefined exception:

An internal exception is raised automatically if your PL/SQL program violates a database rule or exceeds a system-dependent limit. PL/SQL predefines some common ORA-n errors as exceptions. For example, PL/SQL raises the predefined exception NO_DATA_FOUND if a SELECT INTO statement returns no rows.

http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/errors.htm#LNPLS00703

Uladzimir

Uladzimir

B

https://docs.oracle.com/database/121/TTPLS/exceptions.htm#TTPLS195

Non-predefined TimesTen error:
These must be declared in the declarative section of your application. TimesTen implicitly raises the error and you can use an exception handler to catch the error.

C is incorrect it is about User defined errors:
User-defined error: These must be declared in the declarative section. The developer raises the exception explicitly.

roman

roman

B

Non-predefined Oracle Server error
Any other standard Oracle Server error
You need to declare these within the declarative section; the Oracle server will raise the error implicitly, and you can catch for the error in the exception handler.

martin

martin

http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/errors.htm#LNPLS00703
Predefined exceptions are internally defined exceptions that have predefined names, which PL/SQL declares globally in the package STANDARD. The runtime system raises predefined exceptions implicitly (automatically). Because predefined exceptions have names, you can write exception handlers specifically for them.

predefined – have names, no predefined don’t have names – but are still raised implicitly and can be caught in when others

so I think it’s B

FAHAMIDA(IDB23)

FAHAMIDA(IDB23)

Answer-B
plsql 11g book part1, les_8.ppt pag-8

Leo Yu

Leo Yu

A) is incorrect,
e.g NO_DATA_FOUND, you can raise it explicitly, and catch it within exception handler.
BUT NO_DATA_FOUND is still the pre-defined exception

yo

yo

D for sure,

A-> explicity …. no way..
B is incorrect, you need a pragma exception_init ….. otherwise is not possible to catch
C-> user-defined

gelete

gelete

B.
Pre-defined exceptions
A pre-defined exception is a descriptive name assigned to an internally defined exception (ORA-xxxxx).
For example: “ORA-01422” is an internally defined exception. “TOO_MANY_ROWS” is the
pre-defined exception assigned to ORA-01422.
Because they have names, it is possible to create exception handlers for them.

A partial list of predefined exceptions is:
TOO_MANY_ROWS ORA-01422
CASE_NOT_FOUND ORA-06592
CURSOR_ALREADY_OPEN ORA-06511
INVALID_CURSOR ORA-01001
INVALID_NUMBER ORA-01722
NO_DATA_FOUND ORA-00100
PROGRAM_ERROR ORA-06501
ROWTYPE_MISMATCH ORA-06504
SUBSCRIPT_BEYOND_COUNT ORA-06533
SUBSCRIPT_OUTSIDE_LIMIT ORA-06532
VALUE_ERROR ORA-06502

Non-predefined exceptions
They are not defined as PL/SQL exceptions in the Oracle server.
They are standard Oracle errors (ORA-xxxxx errors)
Only a tiny fraction of the internally defined exceptions (ORA-xxxxx) are also Pre-defined exceptions.

You can create exceptions with standard Oracle errors by using the PRAGMA EXCEPTION_INIT function. Such exceptions are called nonpredefined exceptions.

You can trap a nonpredefined Oracle server error by declaring it first. The declared exception is raised implicitly.

DECLARE
e_MissingNull EXCEPTION;
PRAGMA EXCEPTION_INIT(e_MissingNull, -1400);
BEGIN
INSERT INTO employees (id) VALUES (NULL);
EXCEPTION
WHEN e_MissingNull then
DBMS_OUTPUT.put_line(‘ORA-1400 occurred’);
END;

mukundha reddy

mukundha reddy

should we want to raise the exception like
———————
begin
insert into employees(id)values(null)
raise e_missingNull –should we raise it or oracle automatically assigns it.
–if not how come it will raise only that exception ,assume we have two exceptions defined ,then which one it will take.

tavor

tavor

guys, if I click the ‘Show answers’ button, it shows option C is the correct answer.
The words in this question are tricky.

juzz4fun

juzz4fun

D.
Question is to identify the no predefined system errors. A and C are for user-defined exceptions. B can be true for predefined or no predefined errors but D is for sure true for no predefined errors.

Jean barboza

Jean barboza

the answer correct is B because

Non-predefined
Oracle Server error
Any other standard
Oracle Server error
You need to declare these within the
declarative section; the Oracle server
raises the error implicitly, and you
can catch the error in the exception
handler.

User-defined error A condition that the
developer determines is
abnormal
You need to declare in the
declarative section