Merge "[Multimedia] Modified to throw a exception with better error message when... preview1-00238
authorcoderhyme <jhyo.kim@samsung.com>
Fri, 22 Sep 2017 03:09:18 +0000 (03:09 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Fri, 22 Sep 2017 03:09:18 +0000 (03:09 +0000)
src/Tizen.Multimedia.Recorder/Recorder/Recorder.Capabilities.cs

index 7bb79f7..be0b9a7 100644 (file)
@@ -68,7 +68,15 @@ namespace Tizen.Multimedia
 
         private static Capabilities LoadCapabilities()
         {
-            Native.Create(out var handle).ThrowIfError("Failed to load the capabilities"); ;
+            var ret = Native.Create(out var handle);
+
+            if (ret == RecorderErrorCode.NotSupported)
+            {
+                throw new NotSupportedException("Audio recording is not supported.");
+            }
+
+            ret.ThrowIfError("Failed to load the capabilities");
+
             using (handle)
             {
                 return new Capabilities(handle);