docs: add C++ support chapter to the API guides

This commit is contained in:
Ivan Grokhotkov
2022-09-15 18:05:32 +02:00
committed by Jakob Hasse
parent 8184f03115
commit 80d3dc9ac5
9 changed files with 181 additions and 18 deletions

View File

@@ -186,10 +186,4 @@ Error handling patterns
C++ Exceptions
--------------
Support for C++ Exceptions in ESP-IDF is disabled by default, but can be enabled using :ref:`CONFIG_COMPILER_CXX_EXCEPTIONS` option.
Enabling exception handling normally increases application binary size by a few KB. Additionally it may be necessary to reserve some amount of RAM for exception emergency pool. Memory from this pool will be used if it is not possible to allocate exception object from the heap. Amount of memory in the emergency pool can be set using :ref:`CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE` variable.
If an exception is thrown, but there is no ``catch`` block, the program will be terminated by ``abort`` function, and backtrace will be printed. See :doc:`Fatal Errors <fatal-errors>` for more information about backtraces.
See :example:`cxx/exceptions` for an example of C++ exception handling.
See :ref:`cplusplus_exceptions`.