Raise Error in Oracle
RAISE VALUE_ERROR;
Raise Application Error in Oracle

Create custom exception and raise it.
Handle Exception
You could also insert into error log table and RAISE
Reference:
https://blogs.oracle.com/connect/post/error-management


