Handling Specific User defined Ice exception and Delegating the same to client
We have an application where Ice Server is implemented as 2 layers and both of them own separate communicator and object adapter. We have 2 slice file definitions for communication from Client----->First level server[Java implementation]------>Second level server[C++ implementation]. We use different Ice exception defined at each of this level. For example MyAppException is thrown from First level server to Client and MyAppInternalException from Second level server to First level server.
First level server acts as both server and client, for requests from client it implements object adapter and it has proxy to call Second level server. We want to delegate the exception from First level server to Client as MyAppException on specific MyAppInternalException handling.
We were not able to catch MyAppInternalException thrown from Second level server on First level server. But These exception were caught as generic exception java.lang.Exception. How do we catch MyAppInternalException as specific exception and throw proper MyAppException at catch block to client ?