[Bundle] Separate exceptions for invalid handle (#1408)
authorkilig <inkyun.kil@samsung.com>
Fri, 14 Feb 2020 01:43:19 +0000 (10:43 +0900)
committerGitHub <noreply@github.com>
Fri, 14 Feb 2020 01:43:19 +0000 (10:43 +0900)
Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs

index 67b7027..d904f49 100644 (file)
@@ -62,11 +62,16 @@ namespace Tizen.Applications
         /// <since_tizen> 3 </since_tizen>
         public Bundle(SafeBundleHandle handle)
         {
-            if (handle == null || handle.IsInvalid)
+            if (handle == null)
             {
                 throw new ArgumentNullException("handle");
             }
 
+            if (handle.IsInvalid)
+            {
+                throw new ArgumentNullException("handle is invalid");
+            }
+
             _handle = Interop.Bundle.DangerousClone(handle.DangerousGetHandle());
             _keys = new HashSet<string>();
             Interop.Bundle.Iterator iterator = (string key, int type, IntPtr keyval, IntPtr userData) =>