Throw exception when GetStatus gets invalid parameter
authorpr.jung <pr.jung@samsung.com>
Fri, 21 Oct 2016 00:11:11 +0000 (09:11 +0900)
committerpr.jung <pr.jung@samsung.com>
Fri, 21 Oct 2016 04:33:25 +0000 (13:33 +0900)
Change-Id: I4c8360bb753bd9bd3d0ddd97a76a872936dd0c41
Signed-off-by: pr.jung <pr.jung@samsung.com>
Tizen.System/RuntimeInfo/RuntimeInformation.cs
packaging/csapi-system.spec

index be423d150cf8998246cae5814f320ccf603d0c9e..9edefbb3cae8253294fa7ae9a27d09295ad0bf41 100644 (file)
@@ -164,6 +164,11 @@ namespace Tizen.System
         /// <returns>The current status of the given key</returns>
         internal static object GetStatus(RuntimeInformationKey key)
         {
+            Type value;
+            if (!s_keyDataTypeMapping.TryGetValue(key, out value))
+            {
+                RuntimeInfoErrorFactory.ThrowException((int)RuntimeInfoError.InvalidParameter);
+            }
             if (s_keyDataTypeMapping[key] == typeof(int))
             {
                 int status;
index 1dd7853ea9ced728a15bd1be279879482c05a285..75c22347d62affe088b73c1b1c23aab5f0bd236f 100644 (file)
@@ -8,7 +8,7 @@
 
 Name:       csapi-system
 Summary:    Tizen System API for C#
-Version:    1.0.2
+Version:    1.0.3
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0