I believe that the above syntax works OK but cannot be defined higher up in the call stack and resolved at runtime, the way one can do in Java. This makes it much less useful in P4GL than it would be in other languages with proper exception handling, IMHO. (Correct me if I'm wrong).
Eg. a typical case in Java (etc.) is to define a generic error handler right away, call a bunch of stuff, and when an error happens, the runtime searches back thru the call stack until it finds the generic handler. You can also add more specific handlers at appropriate places.
I don't think you can do this in P4GL, unless this has improved recently.