CLSH1001-Firmware/managed_components/espressif__esp-idf-cxx/esp_exception.cpp

22 lines
389 B
C++
Raw Normal View History

2024-03-06 06:09:49 +08:00
/*
* SPDX-FileCopyrightText: 2020 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifdef __cpp_exceptions
#include "esp_exception.hpp"
namespace idf {
ESPException::ESPException(esp_err_t error) : error(error) { }
const char *ESPException::what() const noexcept {
return esp_err_to_name(error);
}
} // namespace idf
#endif // __cpp_exceptions