javacommons/utils/functionserver/src/methodcall.cpp
branchRCL_3
changeset 24 0fd27995241b
parent 19 04becd199f91
--- a/javacommons/utils/functionserver/src/methodcall.cpp	Fri Apr 30 10:40:48 2010 +0300
+++ b/javacommons/utils/functionserver/src/methodcall.cpp	Tue May 11 16:07:20 2010 +0300
@@ -34,7 +34,16 @@
 OS_EXPORT void MethodCaller::ExecuteLeavingFunctorL(const Functor& functor, java::util::FunctionServer* functionServer, int* /*res*/)
 {
     JELOG2(EUtils);
-    int error = functionServer->executeInServerThread(functor);
+    int error = KErrNone;
+    try
+    {
+        error = functionServer->executeInServerThread(functor);
+    }
+    catch (std::exception&)
+    {
+        error = KErrServerTerminated;
+    }
+
     if (error) // Do not use LeaveIfError(), we want to handle positive error codes as well
     {
         User::Leave(error);