Separate IOException from ArgumentException
authorKichan Kwon <k_c.kwon@samsung.com>
Thu, 1 Jun 2017 07:38:07 +0000 (16:38 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Fri, 9 Jun 2017 02:07:16 +0000 (11:07 +0900)
Change-Id: Idc02a9b881952e3e7cafb015438ad38295dadcaa
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
packaging/csapi-information.spec
src/Tizen.System.Information/RuntimeInfo/RuntimeInfoErrorFactory.cs
src/Tizen.System.Information/RuntimeInfo/RuntimeInformation.cs
src/Tizen.System.Information/Tizen.System.Information.csproj

index d719fd9..ce5ae59 100644 (file)
@@ -1,6 +1,6 @@
 Name:       csapi-information
 Summary:    Tizen Information API for C#
-Version:    1.0.4
+Version:    1.0.5
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0
index 308e211..e9fee57 100755 (executable)
@@ -15,6 +15,7 @@
 */
 
 using System;
+using System.IO;
 using System.ComponentModel;
 using Tizen.Internals.Errors;
 
@@ -51,11 +52,11 @@ namespace Tizen.System
             }
             else if (error == RuntimeInfoError.Io)
             {
-                throw new ArgumentException("I/O Error");
+                throw new IOException("I/O Error");
             }
             else if (error == RuntimeInfoError.RemoteIo)
             {
-                throw new ArgumentException("Remote I/O Error");
+                throw new IOException("Remote I/O Error");
             }
             else if (error == RuntimeInfoError.PermissionDenied)
             {
index 34fba9f..2784a01 100755 (executable)
@@ -16,6 +16,7 @@
 
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -260,7 +261,8 @@ namespace Tizen.System
         /// <typeparam name="T">The generic type to return.</typeparam>
         /// <param name="key">The runtime information key for which the current should be read </param>
         /// <returns>The current status of the given key</returns>.
-        /// <exception cref="ArgumentException">Thrown when the <paramref name="key"/> is invalid or I/O error is occurred while reading from system.</exception>
+        /// <exception cref="ArgumentException">Thrown when the <paramref name="key"/> is invalid.</exception>
+        /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system.</exception>
         /// <exception cref="NotSupportedException">Thrown when the feature related <paramref name="key"/> is not supported.</exception>
         public static T GetStatus<T>(RuntimeInformationKey key)
         {\r
@@ -271,7 +273,7 @@ namespace Tizen.System
         /// Gets system memory information
         /// </summary>
         /// <returns>The system memory information structure.</returns>
-        /// <exception cref="ArgumentException">Thrown when I/O error is occurred while reading from system.</exception>
+        /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system.</exception>
         public static SystemMemoryInformation GetSystemMemoryInformation()
         {
             Interop.RuntimeInfo.MemoryInfo info = new Interop.RuntimeInfo.MemoryInfo();
@@ -291,7 +293,8 @@ namespace Tizen.System
         /// <param name="pid">List of unique process ids </param>
         /// <returns>List of memory information per processes</returns>
         /// <privilege>http://tizen.org/privilege/systemmonitor</privilege>
-        /// <exception cref="ArgumentException">Thrown when the <paramref name="pid"/> is empty or I/O error is occurred while reading from system or requesting to resource management daemon.</exception>
+        /// <exception cref="ArgumentException">Thrown when the <paramref name="pid"/> is empty.</exception>
+        /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system or requesting to resource management daemon.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when the memory is not enough to allocate.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when caller doesn't have a privilege to use this method.</exception>
         public static IDictionary<int, ProcessMemoryInformation> GetProcessMemoryInformation(IEnumerable<int> pid)
@@ -321,7 +324,7 @@ namespace Tizen.System
         /// Gets system CPU usage time
         /// </summary>
         /// <returns>The system CPU usage time structure.</returns>
-        /// <exception cref="ArgumentException">Thrown when I/O error is occurred while reading from system.</exception>
+        /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system.</exception>
         public static CpuUsage GetCpuUsage()
         {
             Interop.RuntimeInfo.CpuUsage usage = new Interop.RuntimeInfo.CpuUsage();
@@ -340,7 +343,8 @@ namespace Tizen.System
         /// <param name="pid">List of unique process ids </param>
         /// <returns>List of CPU usage information per processes</returns>
         /// <privilege>http://tizen.org/privilege/systemmonitor</privilege>
-        /// <exception cref="ArgumentException">Thrown when the <paramref name="pid"/> is empty or I/O error is occurred while reading from system or requesting to resource management daemon.</exception>
+        /// <exception cref="ArgumentException">Thrown when the <paramref name="pid"/> is empty.</exception>
+        /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system or requesting to resource management daemon.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when the memory is not enough to allocate.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when caller doesn't have a privilege to use this method.</exception>
         public static IDictionary<int, ProcessCpuUsage> GetProcessCpuUsage(IEnumerable<int> pid)
@@ -370,7 +374,7 @@ namespace Tizen.System
         /// Gets the number of processors
         /// </summary>
         /// <value>The number of processors</value>
-        /// <exception cref="ArgumentException">Thrown when I/O error is occurred while reading from system.</exception>
+        /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system.</exception>
         public static int ProcessorCount
         {
             get
@@ -392,7 +396,8 @@ namespace Tizen.System
         /// </summary>
         /// <param name="coreId">The index (from 0) of CPU core that you want to know the frequency</param>
         /// <returns>The current frequency(MHz) of processor</returns>
-        /// <exception cref="ArgumentException">Thrown when the <paramref name="coreid"/> is invalid or I/O error is occurred while reading from system.</exception>
+        /// <exception cref="ArgumentException">Thrown when the <paramref name="coreid"/> is invalid.</exception>
+        /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system.</exception>
         /// <exception cref="NotSupportedException">Thrown when this system doesn't store CPU current frequency.</exception>
         public static int GetProcessorCurrentFrequency(int coreId)
         {
@@ -411,7 +416,8 @@ namespace Tizen.System
         /// </summary>
         /// <param name="coreId">The index (from 0) of CPU core that you want to know the frequency</param>
         /// <returns>The max frequency(MHz) of processor</returns>
-        /// <exception cref="ArgumentException">Thrown when the <paramref name="coreid"/> is invalid or I/O error is occurred while reading from system.</exception>
+        /// <exception cref="ArgumentException">Thrown when the <paramref name="coreid"/> is invalid.</exception>
+        /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system.</exception>
         /// <exception cref="NotSupportedException">Thrown when this system doesn't store CPU max frequency.</exception>
         public static int GetProcessorMaxFrequency(int coreId)
         {
index 690997d..595d8ae 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">\r
 \r
   <PropertyGroup>\r
-    <Version>1.0.4</Version>\r
+    <Version>1.0.5</Version>\r
     <Authors>Samsung Electronics</Authors>\r
     <Copyright>© Samsung Electronics Co., Ltd All Rights Reserved</Copyright>\r
     <Description>Provide classes for SystemInformation and RuntimeInformation APIs</Description>\r