Fix the exception handling of Terminate API 76/144676/2
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 14 Aug 2017 02:22:38 +0000 (11:22 +0900)
committerSemun Lee <semun.lee@samsung.com>
Thu, 17 Aug 2017 23:09:01 +0000 (23:09 +0000)
Change-Id: I22f6ca8658d8407af771e81409cd9cdd33b545f1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs

index 5438a56223309734be2305a0571d109d5329d394..73f86084a480b2aa875efeffb1052d762a1871b8 100644 (file)
@@ -224,7 +224,8 @@ namespace Tizen.Applications
         /// Terminates the application.
         /// </summary>
         /// <exception cref="ArgumentException">Thrown when failed of invalid argument.</exception>
-        /// <exception cref="InvalidOperationException">Thrown when failed because of permission denied or system error.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when failed because of permission denied.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when failed because of system error.</exception>
         /// <privilege>http://tizen.org/privilege/appmanager.kill</privilege>
         [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.");
                 }