From: pr.jung Date: Fri, 21 Oct 2016 00:11:11 +0000 (+0900) Subject: Throw exception when GetStatus gets invalid parameter X-Git-Tag: accepted/tizen/mobile/20161215.072335~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=31710b244ba3730b43200f0e231ddd382836e2f3;p=platform%2Fcore%2Fcsapi%2Fsystem.git Throw exception when GetStatus gets invalid parameter Change-Id: I4c8360bb753bd9bd3d0ddd97a76a872936dd0c41 Signed-off-by: pr.jung --- diff --git a/Tizen.System/RuntimeInfo/RuntimeInformation.cs b/Tizen.System/RuntimeInfo/RuntimeInformation.cs index be423d1..9edefbb 100644 --- a/Tizen.System/RuntimeInfo/RuntimeInformation.cs +++ b/Tizen.System/RuntimeInfo/RuntimeInformation.cs @@ -164,6 +164,11 @@ namespace Tizen.System /// The current status of the given key 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; diff --git a/packaging/csapi-system.spec b/packaging/csapi-system.spec index 1dd7853..75c2234 100644 --- a/packaging/csapi-system.spec +++ b/packaging/csapi-system.spec @@ -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