Open utterances-bot opened 7 months ago
Wouldn't it make more sense to use thread_local
for the third solution?
@tigran2008 Definitely! In fact, errno
(the standard C library way of dealing with exceptions) is also thread local, with the only difference being that its an integer definitions in errno.h
(for example, #define EINVAL 22
for exception 'invalid argument').
Thanks for commenting! 😸
Exception handling in C - Ido Talbi’s blog
different ways to add "exceptions" to C
https://blog.tal.bi/posts/exceptions-in-c/