From: Hwankyu Jhun Date: Mon, 14 Aug 2017 02:22:38 +0000 (+0900) Subject: Fix the exception handling of Terminate API X-Git-Tag: submit/trunk/20170823.075128~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a295dfa5d1b20fb6bd4b6883f6b391704ee1db1;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Fix the exception handling of Terminate API Change-Id: I22f6ca8658d8407af771e81409cd9cdd33b545f1 Signed-off-by: Hwankyu Jhun --- diff --git a/src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs b/src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs index 5438a56..73f8608 100644 --- a/src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs @@ -224,7 +224,8 @@ namespace Tizen.Applications /// Terminates the application. /// /// Thrown when failed of invalid argument. - /// Thrown when failed because of permission denied or system error. + /// Thrown when failed because of permission denied. + /// Thrown when failed because of system error. /// http://tizen.org/privilege/appmanager.kill [EditorBrowsable(EditorBrowsableState.Never)] public void Terminate() @@ -237,7 +238,7 @@ namespace Tizen.Applications case Interop.ApplicationManager.ErrorCode.InvalidParameter: throw new ArgumentException("Invalid argument."); case Interop.ApplicationManager.ErrorCode.PermissionDenied: - throw new InvalidOperationException("Permission denied."); + throw new UnauthorizedAccessException("Permission denied."); default: throw new InvalidOperationException("Invalid Operation."); }