[Stt/Tts][Fix description about exception] 96/152796/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Wed, 27 Sep 2017 06:27:27 +0000 (15:27 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Wed, 27 Sep 2017 06:27:27 +0000 (15:27 +0900)
Change-Id: I282c4f57efa330e7543817fb2e243ab95f57f03c
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
src/Tizen.Uix.SttEngine/Tizen.Uix.SttEngine/SttEngine.cs
src/Tizen.Uix.TtsEngine/Tizen.Uix.TtsEngine/TtsEngine.cs

index 77f0965..5a95ea1 100755 (executable)
@@ -504,7 +504,6 @@ namespace Tizen.Uix.SttEngine
         /// </remarks>
         /// <param name="argc">The Number of Arguments</param>
         /// <param name="argv">The Arguments Array</param>
-        /// <exception cref="ArgumentException">Thrown in case of Invalid Parameter</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown in case of Permission denied</exception>
         /// <exception cref="NotSupportedException">Thrown in case of Not supported</exception>
         /// <exception cref="InvalidOperationException">thrown in case of Operation failure</exception>
@@ -558,7 +557,6 @@ namespace Tizen.Uix.SttEngine
         /// <param name="resultCount">Result text count</param>
         /// <param name="msg">Engine message</param>
         /// <param name="timeInfo">The time information</param>
-        /// <exception cref="ArgumentException">Thrown in case of Invalid Parameter</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown in case of Permission denied</exception>
         /// <exception cref="NotSupportedException">Thrown in case of Not supported</exception>
         /// <exception cref="InvalidOperationException">thrown in case of Operation failure</exception>
@@ -628,10 +626,9 @@ namespace Tizen.Uix.SttEngine
         /// </feature>
         /// <param name="error">The Error Reason</param>
         /// <param name="msg">The error message</param>
-        /// <exception cref="ArgumentException">Thrown in case of Invalid Parameter</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown in case of Permission denied</exception>
         /// <exception cref="NotSupportedException">Thrown in case of Not supported</exception>
-        /// <exception cref="InvalidOperationException">thrown in case of Operation failure</exception>
+        /// <exception cref="InvalidOperationException">Thrown in case of Operation failure</exception>
         /// <precondition>
         /// Main function should be invoked before this function is called.
         /// </precondition>
@@ -643,7 +640,6 @@ namespace Tizen.Uix.SttEngine
                 Log.Error(LogTag, "SendError Failed with error " + err);
                 throw ExceptionFactory.CreateException((ErrorCode)error);
             }
-
         }
 
         /// <summary>
@@ -657,7 +653,6 @@ namespace Tizen.Uix.SttEngine
         /// This API is invoked when Stt engine wants to notify the change of the speech status anytime. NOTE that this API can be invoked for recognizing the speech.
         /// </remarks>
         /// <param name="status">SpeechStatus</param>
-        /// <exception cref="ArgumentException">Thrown in case of Invalid Parameter</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown in case of Permission denied</exception>
         /// <exception cref="NotSupportedException">Thrown in case of Not supported</exception>
         /// <exception cref="InvalidOperationException">thrown in case of Operation failure</exception>
@@ -705,6 +700,12 @@ namespace Tizen.Uix.SttEngine
         /// </precondition>
         public void SetPrivateDataSetDelegate(Action<string> callback)
         {
+            if (null == callback)
+            {
+                Log.Error(LogTag, "callback is null");
+                throw ExceptionFactory.CreateException(ErrorCode.InvalidParameter);
+            }
+
             _privateDatacallback = callback;
             _privateDataSetCb = (string key, string data) =>
             {
@@ -749,6 +750,12 @@ namespace Tizen.Uix.SttEngine
         /// </precondition>
         public void SetPrivateDataRequestedDelegate(OutAction<string> callback)
         {
+            if (null == callback)
+            {
+                Log.Error(LogTag, "callback is null");
+                throw ExceptionFactory.CreateException(ErrorCode.InvalidParameter);
+            }
+
             _privateDataRequestedCallback = callback;
             _privateDataRequestedCb = (string key, out string data) =>
             {
index e957b74..a93fcc7 100755 (executable)
@@ -390,7 +390,6 @@ namespace Tizen.Uix.TtsEngine
         /// </remarks>
         /// <param name="argc">The argument count(original)</param>
         /// <param name="argv">The argument(original)</param>
-        /// <exception cref="ArgumentException">Thrown in case of Invalid Parameter</exception>
         /// <exception cref="NotSupportedException">Thrown in case of Not supported</exception>
         /// <exception cref="InvalidOperationException">thrown in case of Operation failure</exception>
         public void EngineMain(int argc, string[] argv)
@@ -509,6 +508,8 @@ namespace Tizen.Uix.TtsEngine
         /// </feature>
         /// <param name="error">The error reason</param>
         /// <param name="msg">The error message</param>
+        /// <exception cref="NotSupportedException">Thrown in case of Not supported</exception>
+        /// <exception cref="InvalidOperationException">thrown in case of Operation failure</exception>
         /// <precondition>
         /// EngineMain function should be invoked before this function is called.
         /// </precondition>
@@ -541,7 +542,6 @@ namespace Tizen.Uix.TtsEngine
         /// 4. NotSupported
         /// </param>
         /// <exception cref="ArgumentException">Thrown in case of Invalid Parameter</exception>
-        /// <exception cref="UnauthorizedAccessException">Thrown in case of Permission denied</exception>
         /// <exception cref="NotSupportedException">Thrown in case of Not supported</exception>
         /// <exception cref="InvalidOperationException">thrown in case of Operation failure</exception>
         /// <precondition>
@@ -549,6 +549,12 @@ namespace Tizen.Uix.TtsEngine
         /// </precondition>
         public void SetPrivateDataSetDelegate(Action<string> callback)
         {
+            if (null == callback)
+            {
+                Log.Error(LogTag, "callback is null");
+                throw ExceptionFactory.CreateException(ErrorCode.InvalidParameter);
+            }
+
             _privateDatacallback = callback;
             _privateDataSetCb = (string key, string data) =>
             {
@@ -582,7 +588,6 @@ namespace Tizen.Uix.TtsEngine
         /// 4. NotSupported
         /// </param>
         /// <exception cref="ArgumentException">Thrown in case of Invalid Parameter</exception>
-        /// <exception cref="UnauthorizedAccessException">Thrown in case of Permission denied</exception>
         /// <exception cref="NotSupportedException">Thrown in case of Not supported</exception>
         /// <exception cref="InvalidOperationException">thrown in case of Operation failure</exception>
         /// <precondition>
@@ -590,6 +595,12 @@ namespace Tizen.Uix.TtsEngine
         /// </precondition>
         public void SetPrivateDataRequestedDelegate(OutAction<string> callback)
         {
+            if (null == callback)
+            {
+                Log.Error(LogTag, "callback is null");
+                throw ExceptionFactory.CreateException(ErrorCode.InvalidParameter);
+            }
+
             _privateDataRequestedCallback = callback;
             _privateDataRequestedCb = (string key, out string data) =>
             {