Problem : Difference between Raise & Raise_Application_Error

Problem : Difference between Raise & Raise_Application_Error

What is the difference between RAISE & a RAISE_APPLICATION_ERROR in a PL/SQL Block.

Solution : Difference between Raise & Raise_Application_Error


The Raise_application_error lets us issue user-defined error messages from stored subprograms. That way, we can report errors to our application and avoid
returning unhandled exceptions.

To call raise_application_error, use the syntax

raise_application_error(error_number, message[, {TRUE | FALSE}]);

where error_number is a negative integer in the range -20000 .. -20999

An application can call raise_application_error only from an executing stored subprogram (or method).
When called, raise_application_error ends the subprogram and returns a user-defined error number and
message to the application.

RAISE Statement

PL/SQL Block terminates the processing when there is some error. If we want to Raise an exception and change the path of processing
we can place RAISE statements. By Raise statement, you can raise user defined exceptions.

This is a bried difference between Raise_application_error and Raise Statement
For detail you can consult Oracle Documentation