Fix exceptions and descriptions 18/128918/2
authorsooyeon.kim <sooyeon.kim@samsung.com>
Fri, 12 May 2017 05:23:11 +0000 (14:23 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Fri, 12 May 2017 05:40:00 +0000 (14:40 +0900)
Change-Id: I9a5d69fe5f55ed611bdca97b12f6ce7228501257
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
Tizen.Uix.VoiceControl/Tizen.Uix.VoiceControl/ExceptionFactory.cs
Tizen.Uix.VoiceControl/Tizen.Uix.VoiceControl/VoiceCommand.cs
Tizen.Uix.VoiceControl/Tizen.Uix.VoiceControl/VoiceCommandList.cs
Tizen.Uix.VoiceControl/Tizen.Uix.VoiceControl/VoiceControlClient.cs

index a4d57a9..8c6e35f 100755 (executable)
@@ -29,7 +29,7 @@ namespace Tizen.Uix.VoiceControl
             {
                 case ErrorCode.OutOfMemory:
                     {
-                        exp = new InvalidOperationException("Out Of Memory");
+                        exp = new OutOfMemoryException("Out Of Memory");
                         break;
                     }
 
@@ -41,13 +41,13 @@ namespace Tizen.Uix.VoiceControl
 
                 case ErrorCode.InvalidParameter:
                     {
-                        exp = new InvalidOperationException("Invalid Parameters Provided");
+                        exp = new ArgumentException("Invalid Parameters Provided");
                         break;
                     }
 
                 case ErrorCode.TimedOut:
                     {
-                        exp = new InvalidOperationException("No answer from service");
+                        exp = new TimeoutException("No answer from service");
                         break;
                     }
 
@@ -59,13 +59,13 @@ namespace Tizen.Uix.VoiceControl
 
                 case ErrorCode.PermissionDenied:
                     {
-                        exp = new InvalidOperationException("Permission Denied");
+                        exp = new UnauthorizedAccessException("Permission Denied");
                         break;
                     }
 
                 case ErrorCode.NotSupported:
                     {
-                        exp = new InvalidOperationException("VC NOT supported");
+                        exp = new NotSupportedException("VC NOT supported");
                         break;
                     }
 
index d750ee6..b27b785 100755 (executable)
@@ -61,12 +61,9 @@ namespace Tizen.Uix.VoiceControl
         /// <summary>
         /// Public Constructor
         /// </summary>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Out of memory
-        /// 2. Permission Denied
-        /// 3. Invalid State
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="OutOfMemoryException"> This Exception can be due to Out Of Memory. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
         public VoiceCommand()
         {
             SafeCommandHandle handle;
@@ -109,12 +106,9 @@ namespace Tizen.Uix.VoiceControl
         /// Gets/Sets command type.
         /// </summary>
         /// <remarks>If you do not set the command type, the default value is Undefined. You should set type if command is valid</remarks>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons for set operation
-        /// 1. Invalid parameter
-        /// 2. Permission Denied
-        /// 3. Not supported
-        /// </exception>
+        /// <exception cref="ArgumentException"> This Exception can be due to Invalid Parameter. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
         public CommandType Type
         {
             get
@@ -149,12 +143,9 @@ namespace Tizen.Uix.VoiceControl
         /// Gets/Sets the command format.
         /// </summary>
         /// <remarks>The default format is Fixed</remarks>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons for set operation
-        /// 1. Invalid parameter
-        /// 2. Permission Denied
-        /// 3. Not supported
-        /// </exception>
+        /// <exception cref="ArgumentException"> This Exception can be due to Invalid Parameter. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
         public CommandFormat Format
         {
             get
@@ -183,12 +174,9 @@ namespace Tizen.Uix.VoiceControl
         /// Gets/Sets command
         /// in case of get empty string will be returned in case of some internal error
         /// </summary>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons for set operation
-        /// 1. Invalid parameter
-        /// 2. Permission Denied
-        /// 3. Not supported
-        /// </exception>
+        /// <exception cref="ArgumentException"> This Exception can be due to Invalid Parameter. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
         public string Command
         {
             get
index a6635ed..535c897 100755 (executable)
@@ -43,13 +43,10 @@ namespace Tizen.Uix.VoiceControl
         /// http://tizen.org/feature/speech.control
         /// http://tizen.org/feature/microphone
         /// </feature>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Invalid parameter
-        /// 2. Permission Denied
-        /// 3. Not supported
-        /// 4. Out of memory
-        /// </exception>
+        /// <exception cref="OutOfMemoryException"> This Exception can be due to Out of memory. </exception>
+        /// <exception cref="ArgumentException"> This Exception can be due to Invalid Parameter. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
         public VoiceCommandList()
         {
             SafeCommandListHandle handle = new SafeCommandListHandle();
@@ -139,13 +136,10 @@ namespace Tizen.Uix.VoiceControl
         /// http://tizen.org/feature/microphone
         /// </feature>
         /// <param name="command">The command</param>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Invalid parameter
-        /// 2. Permission Denied
-        /// 3. Not supported
-        /// </exception>
-        /// <exception cref="NullReferenceException">This will occur if the provide parameter is null</exception>
+        /// <exception cref="ArgumentException"> This Exception can be due to Invalid Parameter. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
+        /// <exception cref="NullReferenceException"> This will occur if the provide parameter is null. </exception>
         public void Add(VoiceCommand command)
         {
             ErrorCode error = VcCmdListAdd(_handle, command._handle);
@@ -170,13 +164,10 @@ namespace Tizen.Uix.VoiceControl
         /// http://tizen.org/feature/microphone
         /// </feature>
         /// <param name="command">The command</param>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Invalid parameter
-        /// 2. Permission Denied
-        /// 3. Not supported
-        /// </exception>
-        /// <exception cref="NullReferenceException">This will occur if the provide parameter is null</exception>
+        /// <exception cref="ArgumentException"> This Exception can be due to Invalid Parameter. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
+        /// <exception cref="NullReferenceException"> This will occur if the provide parameter is null. </exception>
         public void Remove(VoiceCommand command)
         {
             ErrorCode error = VcCmdListRemove(_handle, command._handle);
@@ -200,11 +191,8 @@ namespace Tizen.Uix.VoiceControl
         /// http://tizen.org/feature/speech.control
         /// http://tizen.org/feature/microphone
         /// </feature>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Permission Denied
-        /// 2. Not supported
-        /// </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
         public IEnumerable<VoiceCommand> GetAllCommands()
         {
             _list = new List<VoiceCommand>();
@@ -238,12 +226,9 @@ namespace Tizen.Uix.VoiceControl
         /// http://tizen.org/feature/speech.control
         /// http://tizen.org/feature/microphone
         /// </feature>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. List Empty
-        /// 2. Permission Denied
-        /// 3. Not supported
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to List Empty. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
         public void First()
         {
             ErrorCode error = VcCmdListFirst(_handle);
@@ -267,12 +252,9 @@ namespace Tizen.Uix.VoiceControl
         /// http://tizen.org/feature/speech.control
         /// http://tizen.org/feature/microphone
         /// </feature>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. List Empty
-        /// 2. Permission Denied
-        /// 3. Not supported
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to List Empty. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
         public void Last()
         {
             ErrorCode error = VcCmdListLast(_handle);
@@ -300,9 +282,9 @@ namespace Tizen.Uix.VoiceControl
         /// This Exception can be due to the following reaons
         /// 1. List Empty
         /// 2. List reached end
-        /// 3. Permission Denied
-        /// 4. Not supported
         /// </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
         public void Next()
         {
             ErrorCode error = VcCmdListNext(_handle);
@@ -330,9 +312,9 @@ namespace Tizen.Uix.VoiceControl
         /// This Exception can be due to the following reaons
         /// 1. List Empty
         /// 2. List reached end
-        /// 3. Permission Denied
-        /// 4. Not supported
         /// </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
         public void Previous()
         {
             ErrorCode error = VcCmdListPrev(_handle);
index 137df48..85f6b36 100755 (executable)
@@ -334,13 +334,10 @@ namespace Tizen.Uix.VoiceControl
         /// This function should be called before SetCommandList().
         /// </remarks>
         /// <param name="name">Invocation name that an application wants to be invoked by</param>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Invalid parameter
-        /// 2. Invalid state
-        /// 3. Not Supported
-        /// 4. Permission Denied
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="ArgumentException"> This Exception can be due to Invalid Parameter. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
         /// <precondition>
         /// The State must be Ready.
         /// </precondition>
@@ -367,13 +364,10 @@ namespace Tizen.Uix.VoiceControl
         /// http://tizen.org/feature/speech.control
         /// http://tizen.org/feature/microphone
         /// </feature>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Out Of Memory
-        /// 2. Operation Failed
-        /// 3. Not Supported
-        /// 4. Permission Denied
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Operation Failed. </exception>
+        /// <exception cref="OutOfMemoryException"> This Exception can be due to Out Of Memory. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
         /// <postcondition>
         /// The State will be Initialized.
         /// </postcondition>
@@ -400,13 +394,10 @@ namespace Tizen.Uix.VoiceControl
         /// http://tizen.org/feature/speech.control
         /// http://tizen.org/feature/microphone
         /// </feature>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Operation Failed
-        /// 2. Invalid state
-        /// 3. Not Supported
-        /// 4. Permission Denied
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Operation Failed. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
         public static void Deinitialize()
         {
             ErrorCode error = VcDeinitialize();
@@ -430,13 +421,10 @@ namespace Tizen.Uix.VoiceControl
         /// http://tizen.org/feature/speech.control
         /// http://tizen.org/feature/microphone
         /// </feature>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Operation Failed
-        /// 2. Not Supported
-        /// 3. Permission Denied
-        /// 4. Invalid State
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Operation Failed. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
         /// <precondition>
         /// The State should be Initialized
         /// </precondition>
@@ -466,12 +454,9 @@ namespace Tizen.Uix.VoiceControl
         /// http://tizen.org/feature/speech.control
         /// http://tizen.org/feature/microphone
         /// </feature>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Not Supported
-        /// 2. Permission Denied
-        /// 3. Invalid State
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
         /// <precondition>
         /// The State should be Ready
         /// </precondition>
@@ -504,13 +489,10 @@ namespace Tizen.Uix.VoiceControl
         /// http://tizen.org/feature/speech.control
         /// http://tizen.org/feature/microphone
         /// </feature>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Operation Failed
-        /// 2. Not Supported
-        /// 3. Permission Denied
-        /// 4. Invalid State
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Operation Failed. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
         /// <precondition>
         /// The State should be Ready or Initialized
         /// </precondition>
@@ -553,12 +535,10 @@ namespace Tizen.Uix.VoiceControl
         /// In the system command list, there are system commands predefined by product manufacturers.
         /// Those commands have the highest priority. Therefore, the user can not set any commands same with the system commands.
         /// </remarks>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Not Supported
-        /// 2. Permission Denied
-        /// 3. Invalid State
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Operation Failed. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
         /// <precondition>
         /// The State should be Ready
         /// </precondition>
@@ -606,13 +586,10 @@ namespace Tizen.Uix.VoiceControl
         /// <param name="dispText"> Text to be displayed on the screen/// </param>
         /// <param name="uttText">Text to be spoken</param>
         /// <param name="autoStart">A variable for setting whether the dialog session will be restarted automatically or not</param>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Not Supported
-        /// 2. Permission Denied
-        /// 3. Invalid State
-        /// 4. Invalid parameter
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="ArgumentException"> This Exception can be due to Invalid Parameter. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
         /// <precondition>
         /// The State should be Ready
         /// </precondition>
@@ -645,13 +622,10 @@ namespace Tizen.Uix.VoiceControl
         /// </remarks>
         /// <param name="list">Command list</param>
         /// <param name="type">Command type</param>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Not Supported
-        /// 2. Permission Denied
-        /// 3. Invalid State
-        /// 4. Invalid parameter
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="ArgumentException"> This Exception can be due to Invalid Parameter. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
         /// <precondition>
         /// The State should be Ready
         /// </precondition>
@@ -687,13 +661,10 @@ namespace Tizen.Uix.VoiceControl
         /// http://tizen.org/feature/microphone
         /// </feature>
         /// <param name="type">Command type</param>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Not Supported
-        /// 2. Permission Denied
-        /// 3. Invalid State
-        /// 4. Invalid parameter
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="ArgumentException"> This Exception can be due to Invalid Parameter. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
         /// <precondition>
         /// The State should be Ready
         /// </precondition>
@@ -734,12 +705,9 @@ namespace Tizen.Uix.VoiceControl
         /// <param name="resultDelegate">
         /// Callback function to get recognition result
         /// </param>
-        /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
-        /// 1. Not Supported
-        /// 2. Invalid State
-        /// 3. Invalid parameter
-        /// </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="ArgumentException"> This Exception can be due to Invalid Parameter. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to Not Supported. </exception>
         /// <precondition>
         /// The State should be Ready
         /// </precondition>