Oracle Error PLS-00700: PRAGMA EXCEPTION_INIT of string must follow declaration of its exception in the same declarative part

Oracle Error Message

PLS-00700: PRAGMA EXCEPTION_INIT of string must follow declaration of its exception in the same declarative part

Reason for the Error

An EXCEPTION_INIT pragma was not declared in the same block as its exception. They must be declared in the proper order in the same block, with the pragma declaration following the exception declaration.

Solution

Place the EXCEPTION_INIT pragma directly after the exception declaration referenced by the pragma.