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 be423d1..9edefbb 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 1dd7853..75c2234 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