My Project
 All Classes Functions Variables Pages
BLEExceptions.h
1 /*
2  * BLExceptions.h
3  *
4  * Created on: Nov 27, 2017
5  * Author: kolban
6  */
7 
8 #ifndef COMPONENTS_CPP_UTILS_BLEEXCEPTIONS_H_
9 #define COMPONENTS_CPP_UTILS_BLEEXCEPTIONS_H_
10 #include "sdkconfig.h"
11 
12 #if CONFIG_CXX_EXCEPTIONS != 1
13 #error "C++ exception handling must be enabled within make menuconfig. See Compiler Options > Enable C++ Exceptions."
14 #endif
15 
16 #include <exception>
17 
18 
19 class BLEDisconnectedException : public std::exception {
20  const char* what() const throw () {
21  return "BLE Disconnected";
22  }
23 };
24 
25 class BLEUuidNotFoundException : public std::exception {
26  const char* what() const throw () {
27  return "No such UUID";
28  }
29 };
30 
31 #endif /* COMPONENTS_CPP_UTILS_BLEEXCEPTIONS_H_ */
Definition: BLEExceptions.h:25
Definition: BLEExceptions.h:19