summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJH Choi <jjie.choi@samsung.com>2017-09-20 15:27:01 +0900
committerJH Choi <jjie.choi@samsung.com>2017-09-20 15:27:01 +0900
commita97ea3324a42236511dd7adf1aa334cb63527ed6 (patch)
treec67f1004321bec356f87266cbe111928b68ccb2f
parent31dcf98b66e7563cdff465e24d7d854b17d1a52a (diff)
downloadhome-a97ea3324a42236511dd7adf1aa334cb63527ed6.tar.gz
home-a97ea3324a42236511dd7adf1aa334cb63527ed6.tar.bz2
home-a97ea3324a42236511dd7adf1aa334cb63527ed6.zip
Add exception handling
Change-Id: Id447f3efaf366599c4c69c0fb0ad2a1cb066f18a Signed-off-by: JH Choi <jjie.choi@samsung.com>
-rw-r--r--LibCommon.Tizen/Ports/AppControlPort.cs52
1 files changed, 41 insertions, 11 deletions
diff --git a/LibCommon.Tizen/Ports/AppControlPort.cs b/LibCommon.Tizen/Ports/AppControlPort.cs
index 45dad8f..e0acd7d 100644
--- a/LibCommon.Tizen/Ports/AppControlPort.cs
+++ b/LibCommon.Tizen/Ports/AppControlPort.cs
@@ -105,12 +105,27 @@ namespace LibTVRefCommonTizen.Ports
/// </summary>
public void SendAddAppRequestToApps()
{
- AppControl appControl = new AppControl()
+ try
+ {
+ AppControl appControl = new AppControl()
+ {
+ ApplicationId = TVAppsAppID,
+ Operation = AddAppOperation,
+ };
+ AppControl.SendLaunchRequest(appControl);
+ }
+ catch (ArgumentNullException e)
{
- ApplicationId = TVAppsAppID,
- Operation = AddAppOperation,
- };
- AppControl.SendLaunchRequest(appControl);
+ DbgPort.E(e.StackTrace);
+ }
+ catch (InvalidOperationException e)
+ {
+ DbgPort.E(e.StackTrace);
+ }
+ catch (TimeoutException e)
+ {
+ DbgPort.E(e.StackTrace);
+ }
}
/// <summary>
@@ -119,13 +134,28 @@ namespace LibTVRefCommonTizen.Ports
/// <param name="addedAddID">The app ID to add PIN list int the TV Home</param>
public void SendAppAddedNotificationToHome(string addedAddID)
{
- AppControl appControl = new AppControl()
+ try
+ {
+ AppControl appControl = new AppControl()
+ {
+ ApplicationId = TVHomeAppID,
+ Operation = AppAddedNotifyOperation,
+ };
+ appControl.ExtraData.Add(KeyAddedAppID, addedAddID);
+ AppControl.SendLaunchRequest(appControl);
+ }
+ catch (ArgumentNullException e)
{
- ApplicationId = TVHomeAppID,
- Operation = AppAddedNotifyOperation,
- };
- appControl.ExtraData.Add(KeyAddedAppID, addedAddID);
- AppControl.SendLaunchRequest(appControl);
+ DbgPort.E(e.StackTrace);
+ }
+ catch (InvalidOperationException e)
+ {
+ DbgPort.E(e.StackTrace);
+ }
+ catch (TimeoutException e)
+ {
+ DbgPort.E(e.StackTrace);
+ }
}
}
}