Try OpenEdge Now
skip to main content
Application Migration and Development Guide
Application Development with PAS for OpenEdge : Programming the Progress Application Server for OpenEdge : Handling conditions and returning values : Raising the ERROR condition and returning values
 
Raising the ERROR condition and returning values
You can return application exceptions, with or without associated values, to client applications by executing the RETURN ERROR statement. The effect is similar to a local procedure return. When you execute this statement in any remote procedure (persistent or non-persistent), the procedure:
1. Terminates
2. Raises the ERROR condition on the RUN statement in the client (or an equivalent exception in an Open Client)
3. Returns any specified value to the client application
An ERROR condition raised in an Activate procedure for a session running a session-free or unbound session-managed request has the same effect as if it were raised in the remote procedure for the request.
To return a value without raising the ERROR condition, use the RETURN statement without the ERROR option.
Note: The LONGCHAR and MEMPTR data types cannot be returned from a remote user-defined function.