2018-05-29 05:25:24 -04:00
|
|
|
|
2021-05-16 20:56:33 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2018-05-29 05:25:24 -04:00
|
|
|
#ifndef _ESP_EXCEPTION_H_
|
|
|
|
#define _ESP_EXCEPTION_H_
|
|
|
|
|
|
|
|
//
|
|
|
|
// This exception stub is enabled only if exceptions are disabled in menuconfig
|
|
|
|
//
|
2019-04-24 09:02:25 -04:00
|
|
|
#if !defined(CONFIG_COMPILER_CXX_EXCEPTIONS) && defined (ASIO_NO_EXCEPTIONS)
|
2018-05-29 05:25:24 -04:00
|
|
|
|
|
|
|
#include "esp_log.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// asio exception stub
|
|
|
|
//
|
|
|
|
namespace asio {
|
|
|
|
namespace detail {
|
|
|
|
template <typename Exception>
|
|
|
|
void throw_exception(const Exception& e)
|
|
|
|
{
|
2020-11-10 02:40:01 -05:00
|
|
|
ESP_LOGE("esp32_asio_exception", "Caught exception: %s!", e.what());
|
2018-05-29 05:25:24 -04:00
|
|
|
abort();
|
|
|
|
}
|
|
|
|
}}
|
2019-04-24 09:02:25 -04:00
|
|
|
#endif // CONFIG_COMPILER_CXX_EXCEPTIONS==1 && defined (ASIO_NO_EXCEPTIONS)
|
2018-05-29 05:25:24 -04:00
|
|
|
|
|
|
|
#endif // _ESP_EXCEPTION_H_
|