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
Why C?
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.
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.
I guess in the question text the ‘no predefined’ means non predefined exception
b is answer
B is correct
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.
Please provide any evidence if exits
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
You are correct. Answer should be B.
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.
C is wrong
Please refer the link
See “Exception types” in http://docs.oracle.com/cd/E11882_01/timesten.112/e21639/exceptions.htm#TTPLS194
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
Even if it is “NON PREDEFINED” it is Oracle Server errors only and not User-Defined.
Pre-defined server errors are ZERO_DIVIDE, NO_ROWS_FOUND etc.
Non-predefined ORA-2292, ORA-2293 etc.
Both have to be handled in exception block.
So ans is B.
Refer:
https://akdora.wordpress.com/2009/02/05/non-predefined-exception-example/
B
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
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
B
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.
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.
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
Answer-B
plsql 11g book part1, les_8.ppt pag-8
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
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
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;
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.
guys, if I click the ‘Show answers’ button, it shows option C is the correct answer.
The words in this question are tricky.
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.
That is the best search engine in the world
http://google.com
Very smooth article. I surely love this site . Continue the good work!
http://wwwcenturionwealth.com/
Very smooth article piece. I definitely love your site. Keep writing!
http://www.investopedia.com/advisor-network/advisors/61757/wendy-ann-payne-csa-cep-/
This is the very best search engine in the world
http://google.com
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