Remove throw exception in the callback 16/125116/1 accepted/tizen/unified/20170414.163613 submit/tizen/20170414.033956
authorMinje Ahn <minje.ahn@samsung.com>
Fri, 14 Apr 2017 01:38:54 +0000 (10:38 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Fri, 14 Apr 2017 01:38:54 +0000 (10:38 +0900)
Change throw to task.setResult

Change-Id: I3ed86dd6b30869ee182edf816b8e28582d609c92
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInformation.cs
packaging/csapi-media-content.spec

index 8ba0bdc..29c0747 100755 (executable)
@@ -85,7 +85,11 @@ namespace Tizen.Content.MediaContent
             var task = new TaskCompletionSource<string>();
             Interop.MediaInformation.MediaThumbnailCompletedCallback thumbnailResult = (MediaContentError createResult, string path, IntPtr userData) =>
             {
-                MediaContentValidator.ThrowIfError(createResult, "Failed to create thumbnail");
+                if (createResult != MediaContentError.None)\r
+                {\r
+                    task.SetException(new InvalidOperationException("Failed to create thumbnail:" + createResult));\r
+                }
+
                 task.SetResult(path);
             };
             MediaContentValidator.ThrowIfError(
@@ -116,7 +120,11 @@ namespace Tizen.Content.MediaContent
 
             Interop.MediaInformation.MediaThumbnailCompletedCallback thumbnailResult = (MediaContentError createResult, string path, IntPtr userData) =>
             {
-                MediaContentValidator.ThrowIfError(createResult, "Failed to create thumbnail");
+                if (createResult != MediaContentError.None)\r
+                {\r
+                    task.SetException(new InvalidOperationException("Failed to create thumbnail:" + createResult));\r
+                }
+
                 task.SetResult(path);
             };
 
index 3c27d5f..fdd9c57 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       csapi-media-content
 Summary:    Tizen Media Content API for C#
-Version:    1.0.17
+Version:    1.0.18
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0