What is Pragma Init Exception in oracle? Difference between user defined exception and init pragma exception.
Pragma Init Exception is declared using the following syntax:-
PRAGMA EXCEPTION_INIT(exception_name, oracle_error_nb);
This directs the compiler to add the user defined error message to the oracle error number. It associate the user defined error message to predefined error codes.
Pragma init exception is used to associate a user defined exception with an error number and a custom message where as User-defined exception is raised explicitly. Pragma Init exception can be associated with an Oracle inter error and be raised implicitly.