aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h')
-rw-r--r--Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h b/Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h
new file mode 100644
index 000000000..e3c61c8e5
--- /dev/null
+++ b/Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h
@@ -0,0 +1,31 @@
+#include <stdio.h>
+#include "stdafx.h"
+#include <stdlib.h>
+#include <conio.h>
+#include <windows.h>
+#include "lmdfu.h"
+#include "lmdfuwrap.h"
+#include "DFUError.h"
+
+#pragma once
+
+using namespace System;
+
+namespace Tango
+{
+ namespace FirmwareUpdateLib {
+
+ ref class DFUException :
+ public Exception
+ {
+ internal:
+ DFUException(tLMDFUErr error) : Exception(gcnew String(_LMDFUErrorStringGet(error))) { Error = static_cast<DFUError>(error); };
+ public:
+ property DFUError Error;
+ DFUException();
+ DFUException(DFUError error) : Exception(error.ToString()) { Error = error; };
+ DFUException(DFUError error, String^ message) : Exception(message) { Error = error; };
+ };
+ }
+}
+