https://github.com/simpart/c-try
It recreates `try {}` / `catch {}` / `finally {}` in plain C using just macros and global variables. There's also a `$` macro to propagate errors between function calls — a bit like a mini DSL for error handling.
You can find a working example in `test.c`.
It doesn't support nesting or multithreading, and yes, it abuses macros. But hey, it's C.
actionfromafar•1h ago