-using Tizen;\r
+using System;\r
+using Tizen;\r
using Tizen.Applications;\r
using Tizen.Applications.RPCPort;\r
\r
protected override bool OnReceivedEvent(string sender, string instance, Port port)\r
{\r
Log.Debug("RPCPortStub", "OnReceivedEvent: sender::" + sender + " instance::" + instance);\r
- using (Parcel p = new Parcel(port))\r
+ try\r
{\r
- string str = p.ReadString();\r
- using (Parcel ret = new Parcel())\r
+ using (Parcel p = new Parcel(port))\r
{\r
- ret.WriteString(str);\r
- ret.Send(GetPort(Port.Type.Callback, instance));\r
+ string str = p.ReadString();\r
+ using (Parcel ret = new Parcel())\r
+ {\r
+ ret.WriteString(str);\r
+ ret.Send(GetPort(Port.Type.Callback, instance));\r
+ }\r
}\r
}\r
+ catch (Exception)\r
+ {\r
+ Log.Error("RPCPortStub", "Exception happens");\r
+ return false;\r
+ }\r
\r
return true;\r
}\r