Ans: An error is raised implicitly whenever your PL/SQL program violates an Oracle rule or exceeds a system-dependent limit. Every Oracle error has a number, but exceptions must be handled by name. So, PL/SQL predefines some common Oracle errors as exceptions which are called predefined exceptions.
All other errors are undefined and Oracle provides the pragma EXCEPTION_INIT to associate an exception name with Oracle error codes.
It is a directive to the compiler asking to associate a user provided exception name to the oracle error. There by displaying a specific error message pertaining to the error occurred. We can intercept any pre-defined ORA- error and write a specific handler for it, instead of using the OTHERS handler.
Syntax:
PRAGMA EXCEPTION_INIT (exception_name, oracle_error_name)