Message Oracle PLS-00233 - function name used as an exception name in when clause

ERRORfunction name used as an exception name in when clause
CAUSEThe WHEN clause in an exception handler contains a function call instead of an exception name. A valid exception handler consists of a WHEN clause, which must specify an exception, followed by a sequence of statements to be executed when that exception is raised.
ACTIONCheck the spelling of the identifier in the WHEN clause, then replace the function call with an exception name.