本项止转自github官方arduino-esp32 传在这里仅为阅读源码方便
projectuser
2019-07-05 50148ccffe21ff54262064ec9f2245900eaf18aa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * BLExceptions.h
 *
 *  Created on: Nov 27, 2017
 *      Author: kolban
 */
 
#ifndef COMPONENTS_CPP_UTILS_BLEEXCEPTIONS_H_
#define COMPONENTS_CPP_UTILS_BLEEXCEPTIONS_H_
#include "sdkconfig.h"
 
#if CONFIG_CXX_EXCEPTIONS != 1
#error "C++ exception handling must be enabled within make menuconfig. See Compiler Options > Enable C++ Exceptions."
#endif
 
#include <exception>
 
 
class BLEDisconnectedException : public std::exception {
    const char* what() const throw () {
        return "BLE Disconnected";
    }
};
 
class BLEUuidNotFoundException : public std::exception {
    const char* what() const throw () {
        return "No such UUID";
    }
};
 
#endif /* COMPONENTS_CPP_UTILS_BLEEXCEPTIONS_H_ */