Replies: 2 comments
-
Hi mkreil, No, exceptions in C++ do not require RTTI. Modern implementations of exceptions have very little overhead in runtime performance, but can seriously increase the code size. If you don't use exceptions then you can use the error handler framework. You define an error handler and exception class objects are passed to it as a simple parameter. |
Beta Was this translation helpful? Give feedback.
-
FYI, we are using exceptions on an STM32F407 MCU (Cortex M4). Exceptions require full-blown newlib instead of newlib-nano, which adds something like 60 kB to flash usage. |
Beta Was this translation helpful? Give feedback.
-
Hello togehter,
I am wondering how the expection handling of the ETL is working correctly without RTTI. I've tried it in a demo project and it indeed works fine, but I can't explain how.
I would like to enable the error handling with the compiler switch ETL_THROW_EXCEPTIONS, but I definetly don't want to enable the RTTI in my project. It's a lightweight project on a small controller (Cortex-M4).
Could you please give me some advice if enabling the expecptions, without enabling the RTTI, has big impact on runtime performance or memory concumption?
If I don't enable expections, then there is no error checking at all, right?
Thanks a lot for your help.
Kind regards,
Michael
Beta Was this translation helpful? Give feedback.
All reactions