From: coderhyme Date: Thu, 21 Sep 2017 09:00:15 +0000 (+0900) Subject: [Multimedia] Modified the logic handling a task of the ThumbanailExtractor not to... X-Git-Tag: preview1-00238~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=555d398627cc806502cf4409555980da3a61b54f;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Multimedia] Modified the logic handling a task of the ThumbanailExtractor not to throw exceptions when setting the task result. Change-Id: I90bbd964222c6dfa5563328ca2b066eb7a0a8ebe Signed-off-by: coderhyme --- diff --git a/src/Tizen.Multimedia.Util/ThumbnailExtractor/ThumbnailExtractor.cs b/src/Tizen.Multimedia.Util/ThumbnailExtractor/ThumbnailExtractor.cs index c9ff018..4ec117b 100755 --- a/src/Tizen.Multimedia.Util/ThumbnailExtractor/ThumbnailExtractor.cs +++ b/src/Tizen.Multimedia.Util/ThumbnailExtractor/ThumbnailExtractor.cs @@ -199,11 +199,11 @@ namespace Tizen.Multimedia.Util byte[] tmpBuf = new byte[dataSize]; Marshal.Copy(thumbData, tmpBuf, 0, dataSize); - tcs.SetResult(new ThumbnailExtractionResult(tmpBuf, thumbWidth, thumbHeight)); + tcs.TrySetResult(new ThumbnailExtractionResult(tmpBuf, thumbWidth, thumbHeight)); } catch (Exception e) { - tcs.SetException(new InvalidOperationException("[" + error + "] Failed to copy data.", e)); + tcs.TrySetException(new InvalidOperationException("[" + error + "] Failed to copy data.", e)); } finally { @@ -212,7 +212,7 @@ namespace Tizen.Multimedia.Util } else { - tcs.SetException(error.ToException("Failed to extract.")); + tcs.TrySetException(error.ToException("Failed to extract.")); } }; }