javacommons/utils/functionserver/src/methodcall.cpp
changeset 23 98ccebc37403
parent 21 2a9601315dfc
--- a/javacommons/utils/functionserver/src/methodcall.cpp	Mon May 03 12:27:20 2010 +0300
+++ b/javacommons/utils/functionserver/src/methodcall.cpp	Fri May 14 15:47:24 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);