From: Kichan Kwon Date: Thu, 1 Jun 2017 07:38:07 +0000 (+0900) Subject: Separate IOException from ArgumentException X-Git-Tag: submit/trunk/20170823.075128~106^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88faf25466e101a311ac060ebd4db1a78d0e15f7;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Separate IOException from ArgumentException Change-Id: Idc02a9b881952e3e7cafb015438ad38295dadcaa Signed-off-by: Kichan Kwon --- diff --git a/packaging/csapi-information.spec b/packaging/csapi-information.spec index d719fd9..ce5ae59 100644 --- a/packaging/csapi-information.spec +++ b/packaging/csapi-information.spec @@ -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 diff --git a/src/Tizen.System.Information/RuntimeInfo/RuntimeInfoErrorFactory.cs b/src/Tizen.System.Information/RuntimeInfo/RuntimeInfoErrorFactory.cs index 308e211..e9fee57 100755 --- a/src/Tizen.System.Information/RuntimeInfo/RuntimeInfoErrorFactory.cs +++ b/src/Tizen.System.Information/RuntimeInfo/RuntimeInfoErrorFactory.cs @@ -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) { diff --git a/src/Tizen.System.Information/RuntimeInfo/RuntimeInformation.cs b/src/Tizen.System.Information/RuntimeInfo/RuntimeInformation.cs index 34fba9f..2784a01 100755 --- a/src/Tizen.System.Information/RuntimeInfo/RuntimeInformation.cs +++ b/src/Tizen.System.Information/RuntimeInfo/RuntimeInformation.cs @@ -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 /// The generic type to return. /// The runtime information key for which the current should be read /// The current status of the given key. - /// Thrown when the is invalid or I/O error is occurred while reading from system. + /// Thrown when the is invalid. + /// Thrown when I/O error is occurred while reading from system. /// Thrown when the feature related is not supported. public static T GetStatus(RuntimeInformationKey key) { @@ -271,7 +273,7 @@ namespace Tizen.System /// Gets system memory information /// /// The system memory information structure. - /// Thrown when I/O error is occurred while reading from system. + /// Thrown when I/O error is occurred while reading from system. public static SystemMemoryInformation GetSystemMemoryInformation() { Interop.RuntimeInfo.MemoryInfo info = new Interop.RuntimeInfo.MemoryInfo(); @@ -291,7 +293,8 @@ namespace Tizen.System /// List of unique process ids /// List of memory information per processes /// http://tizen.org/privilege/systemmonitor - /// Thrown when the is empty or I/O error is occurred while reading from system or requesting to resource management daemon. + /// Thrown when the is empty. + /// Thrown when I/O error is occurred while reading from system or requesting to resource management daemon. /// Thrown when the memory is not enough to allocate. /// Thrown when caller doesn't have a privilege to use this method. public static IDictionary GetProcessMemoryInformation(IEnumerable pid) @@ -321,7 +324,7 @@ namespace Tizen.System /// Gets system CPU usage time /// /// The system CPU usage time structure. - /// Thrown when I/O error is occurred while reading from system. + /// Thrown when I/O error is occurred while reading from system. public static CpuUsage GetCpuUsage() { Interop.RuntimeInfo.CpuUsage usage = new Interop.RuntimeInfo.CpuUsage(); @@ -340,7 +343,8 @@ namespace Tizen.System /// List of unique process ids /// List of CPU usage information per processes /// http://tizen.org/privilege/systemmonitor - /// Thrown when the is empty or I/O error is occurred while reading from system or requesting to resource management daemon. + /// Thrown when the is empty. + /// Thrown when I/O error is occurred while reading from system or requesting to resource management daemon. /// Thrown when the memory is not enough to allocate. /// Thrown when caller doesn't have a privilege to use this method. public static IDictionary GetProcessCpuUsage(IEnumerable pid) @@ -370,7 +374,7 @@ namespace Tizen.System /// Gets the number of processors /// /// The number of processors - /// Thrown when I/O error is occurred while reading from system. + /// Thrown when I/O error is occurred while reading from system. public static int ProcessorCount { get @@ -392,7 +396,8 @@ namespace Tizen.System /// /// The index (from 0) of CPU core that you want to know the frequency /// The current frequency(MHz) of processor - /// Thrown when the is invalid or I/O error is occurred while reading from system. + /// Thrown when the is invalid. + /// Thrown when I/O error is occurred while reading from system. /// Thrown when this system doesn't store CPU current frequency. public static int GetProcessorCurrentFrequency(int coreId) { @@ -411,7 +416,8 @@ namespace Tizen.System /// /// The index (from 0) of CPU core that you want to know the frequency /// The max frequency(MHz) of processor - /// Thrown when the is invalid or I/O error is occurred while reading from system. + /// Thrown when the is invalid. + /// Thrown when I/O error is occurred while reading from system. /// Thrown when this system doesn't store CPU max frequency. public static int GetProcessorMaxFrequency(int coreId) { diff --git a/src/Tizen.System.Information/Tizen.System.Information.csproj b/src/Tizen.System.Information/Tizen.System.Information.csproj index 690997d..595d8ae 100644 --- a/src/Tizen.System.Information/Tizen.System.Information.csproj +++ b/src/Tizen.System.Information/Tizen.System.Information.csproj @@ -1,7 +1,7 @@  - 1.0.4 + 1.0.5 Samsung Electronics © Samsung Electronics Co., Ltd All Rights Reserved Provide classes for SystemInformation and RuntimeInformation APIs