Catch and AppServer

Posted by alextrs on 07-Oct-2009 07:22

Hello,

Try to use ROUTINE-LEVEL ON ERROR UNDO, THROW.  in my procedure on AppServer side and then

CATCH error on client side.

I get the error status, but instead of message with ERROR status I see just empty string.

Can Progress work in such way, or in this case I should use RETURN ERROR "MESSAGE"?

All Replies

Posted by sarahm on 07-Oct-2009 07:34

Unfortunately the only information you can pass across from the AppServer is an error string on the RETURN ERROR statement.  As you noted you can communicate to the client that an error occured, but no other information is passed across the wire.  Until we can reference objects remotely, or pass objects between the client and the AppServer, the scope of error objects is limited to the session in which they are created -- in your case the AppServer session.

Posted by Admin on 07-Oct-2009 07:34

Error objects don't make it accross the AppServer boundary. So basically RETURN ERROR "ERROR-STRING" is the way to go.

What I suggest is to use as less as possible entry points to logic on the AppServer (service interface). Then you can have a central CATCH block there and implement a proper protocol to return the error information to the client (service adapter).

This thread is closed