mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-07-02 19:26:56 +02:00
18 lines
663 B
C#
18 lines
663 B
C#
|
namespace ShareeBike.Services.BluetoothLock.BLE
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Exception which is thrown if a BLE API call return a non zero return code which indicates an error.
|
||
|
/// </summary>
|
||
|
public class BleReturnCodeException : System.Exception
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Constructs exceptions
|
||
|
/// </summary>
|
||
|
/// <param name="successCode">Error code returned form BLE API call. </param>
|
||
|
/// <param name="context">Message which describes API call context.</param>
|
||
|
public BleReturnCodeException(int successCode, string context) : base($"{context}. Code returned by BLE API is {successCode}") => SuccessCode = successCode;
|
||
|
|
||
|
public int SuccessCode { get; }
|
||
|
}
|
||
|
}
|