From: kibak.yoon Date: Fri, 21 Oct 2016 05:04:10 +0000 (+0900) Subject: csapi-sensor: update API spec about exceptions X-Git-Tag: submit/tizen/20161214.063015~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d606917d884126797d015d521ea4b1185ef075d2;p=platform%2Fcore%2Fcsapi%2Fsensor.git csapi-sensor: update API spec about exceptions - Added the below Exceptions * NotSupportedException * UnauthorizedAccessException Change-Id: I8319da08508dd663d365b2750a376dcf00001636 Signed-off-by: kibak.yoon --- diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs index 17025e6..5cce251 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs @@ -12,7 +12,7 @@ namespace Tizen.Sensor { /// /// Accelerometer Sensor Class. Used for registering callbacks for accelerometer and getting accelerometer data - /// /// + /// public class Accelerometer : Sensor { private static string AccelerometerKey = "http://tizen.org/feature/sensor.accelerometer"; @@ -46,6 +46,7 @@ namespace Tizen.Sensor /// /// Returns the number of accelerometer sensors available on the device. /// + /// Thrown when the operation is invalid for the current state public static int Count { get @@ -58,6 +59,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular accelerometer sensor in case of multiple sensors /// @@ -74,7 +78,6 @@ namespace Tizen.Sensor /// /// Event Handler for storing the callback functions for event corresponding to change in accelerometer sensor data. /// - public event EventHandler DataUpdated; private static int GetCount() diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs index 18df9b6..69adcc2 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular face down gesture detector in case of multiple sensors. /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs index e1d8eb5..07a330a 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs @@ -12,7 +12,7 @@ namespace Tizen.Sensor { /// /// GravitySensor Class. Used for registering callbacks for gravity sensor and getting gravity data - /// /// + /// public class GravitySensor : Sensor { private const string GravitySensorKey = "http://tizen.org/feature/sensor.gravity"; @@ -60,6 +60,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular gravity sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs index 01ec84a..579a634 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs @@ -12,7 +12,7 @@ namespace Tizen.Sensor { /// /// Gyroscope Sensor Class. Used for registering callbacks for gyroscope and getting gyroscope data - /// /// + /// public class Gyroscope : Sensor { private const string GyroscopeKey = "http://tizen.org/feature/sensor.gyroscope"; @@ -59,6 +59,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular gyroscope sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs index 4651983..bfba8aa 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs @@ -12,7 +12,7 @@ namespace Tizen.Sensor { /// /// GyroscopeRotationVectorSensor Class. Used for registering callbacks for gyroscope rotation vector sensor and getting gyroscope rotation vector data - /// /// + /// public class GyroscopeRotationVectorSensor : Sensor { private const string GyroscopeRVKey = "http://tizen.org/feature/sensor.gyroscope_rotation_vector"; @@ -69,6 +69,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular gyroscope rotation vector sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs index f5ea54a..c9f3497 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs @@ -49,6 +49,13 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// + /// For accessing heart rate monitor, app should have http://tizen.org/privilege/healthinfo privilege. + /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the app has no privilege to use the sensor + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular heart rate monitor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs index d611b0c..2c739a2 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular humidity sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs index 47e9931..7b518bb 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular in-vehicle activity detector in case of multiple sensors. /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs index 869580e..4e4d87b 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular light sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs index 69232a0..aa767b7 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs @@ -60,6 +60,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular linear acceleration sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs index db407df..e0ed9d2 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs @@ -60,6 +60,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular magnetometer in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs index f90ed36..91fbb92 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs @@ -70,6 +70,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular magnetometer rotation vector sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs index 6a2d68e..132456e 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs @@ -60,6 +60,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular orientation sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs index 67f2920..9e5a0d6 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs @@ -84,6 +84,13 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// + /// For accessing pedometer, app should have http://tizen.org/privilege/healthinfo privilege. + /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the app has no privilege to use the sensor + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular pedometer sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs index 09c18f0..f236a4a 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular pick up gesture detector in case of multiple sensors. /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs index 1a622d7..5ee28ad 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular pressure sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs index e61b774..15195c6 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular proximity sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs index 52cb6e2..be44649 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs @@ -70,6 +70,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular rotation vector sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs index febf956..917f930 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular running activity detector in case of multiple sensors. /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs index 4aaff52..f08a80b 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs @@ -49,6 +49,13 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// + /// For accessing sleep monitor, app should have http://tizen.org/privilege/healthinfo privilege. + /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the app has no privilege to use the sensor + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular sleep monitor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs index 04c9788..73a83cd 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular stationary activity detector in case of multiple sensors. /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs index cd495cf..ac09680 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular temperature sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs index 3df18ec..d04a104 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular ultraviolet sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs index a66e054..302efec 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs @@ -74,6 +74,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular uncalibrated gyroscope sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs index 222dd14..a9bb8b4 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs @@ -75,6 +75,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular uncalibrated magnetometer sensor in case of multiple sensors /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs index cb28c7d..307a16b 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular walking activity detector in case of multiple sensors. /// diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs index a5624eb..c7134ae 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs @@ -49,6 +49,9 @@ namespace Tizen.Sensor /// /// Initializes a new instance of the class. /// + /// Thrown when an invalid argument is used + /// Thrown when the sensor is not supported + /// Thrown when the operation is invalid for the current state /// /// Index. Default value for this is 0. Index refers to a particular wrist up gesture detector in case of multiple sensors. /// diff --git a/Tizen.Sensor/Tizen.Sensor/Sensor.cs b/Tizen.Sensor/Tizen.Sensor/Sensor.cs index f255070..0245e84 100644 --- a/Tizen.Sensor/Tizen.Sensor/Sensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Sensor.cs @@ -158,6 +158,7 @@ namespace Tizen.Sensor /// Sets the interval of the sensor for sensor data event /// Callbacks will be called at frequency of this interval /// + /// Thrown when the operation is invalid for the current state public uint Interval { set @@ -176,6 +177,7 @@ namespace Tizen.Sensor /// /// Sets the max batch latency for the sensor corresponding to the sensor data event. /// + /// Thrown when the operation is invalid for the current state public uint MaxBatchLatency { set @@ -194,7 +196,8 @@ namespace Tizen.Sensor /// /// Sets the pause policy of the sensor. /// - /// + /// The pause policy + /// Thrown when the operation is invalid for the current state public SensorPausePolicy PausePolicy { set @@ -274,6 +277,7 @@ namespace Tizen.Sensor /// Starts the sensor. /// After this the event handlers will start receiving events. /// + /// Thrown when the operation is invalid for the current state public void Start() { Log.Info(Globals.LogTag, "Starting the sensor"); @@ -295,6 +299,7 @@ namespace Tizen.Sensor /// Stop the sensor. /// After this the event handlers will stop receiving the events /// + /// Thrown when the operation is invalid for the current state public void Stop() { Log.Info(Globals.LogTag, "Stopping the sensor"); diff --git a/Tizen.Sensor/Tizen.Sensor/SensorErrorFactory.cs b/Tizen.Sensor/Tizen.Sensor/SensorErrorFactory.cs index 666e430..82db8db 100644 --- a/Tizen.Sensor/Tizen.Sensor/SensorErrorFactory.cs +++ b/Tizen.Sensor/Tizen.Sensor/SensorErrorFactory.cs @@ -37,9 +37,9 @@ namespace Tizen.Sensor case SensorError.InvalidParameter: return new ArgumentException("Invalid Parameter: " + msg); case SensorError.NotSupported: - return new InvalidOperationException("Not Supported: " + msg); + return new NotSupportedException("Not Supported: " + msg); case SensorError.PermissionDenied: - return new InvalidOperationException("Permission Denied: " + msg); + return new UnauthorizedAccessException("Permission Denied: " + msg); case SensorError.OutOfMemory: return new InvalidOperationException("Out of Memory: " + msg); case SensorError.NotNeedCalibration: @@ -51,4 +51,4 @@ namespace Tizen.Sensor } } } -} \ No newline at end of file +}