Can I use assert() without making root crash?

I would like to use assert() in my analysis to check e.g. correct sizes of vectors passed to functions. However, each time the assert fails, not only my makro/script is aborted, but the root application is shutdown also.
In my final analysis the assert() should not fail, but still it is a bit inconvenient to restart root each time the assert() causes an abort while debugging.

man assert
man abort

@Wile E. Coyote
How is this answer supposed to help me finding a solution? If you want to imply that I didnt try any other source of information before posting here, you could tell me directly instead of spamming the forum.

ps: your answer reminded me of this However, “Mission not really accomplished” :wink:

I don’t know which part of these man pages you don’t understand.

If I were you, I would start to use try, throw, and catch statements (i.e. the standard C++ exception handling mechanism).

I read it but I still do not understand if it is possible to abort my script/makro while keeping the root application running.

Maybe using try, throw and catch could work. However, I want to catch errors only in a debugging phase and later for the running program try/catch/throw would just make my code less readable, when anyway I will not need the checks anymore.