From 20b28087f6e0f472e2639d437a0738e414a451c8 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Fri, 13 Nov 2015 11:05:34 +0100 Subject: [PATCH] Fixed some exception related stuff in the CUE.NET initialization --- CueSDK.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CueSDK.cs b/CueSDK.cs index c6c48b7..011d0a4 100644 --- a/CueSDK.cs +++ b/CueSDK.cs @@ -61,11 +61,13 @@ namespace CUE.NET #region Methods + // ReSharper disable once ExceptionNotThrown /// /// Initializes the CUE-SDK. This method should be called exactly ONE time, before anything else is done. /// /// Specifies whether the application should request exclusive access or not. /// Thrown if the SDK is already initialized, the SDK is not compatible to CUE or if CUE returns unknown devices. + /// Thrown if the CUE-SDK provides an error. public static void Initialize(bool exclusiveAccess = false) { if (ProtocolDetails != null) @@ -85,7 +87,7 @@ namespace CUE.NET if (exclusiveAccess) { if (!_CUESDK.CorsairRequestControl(CorsairAccessMode.ExclusiveLightingControl)) - Throw(error); + Throw(LastError); HasExclusiveAccess = true; }