Yeah. For those who haven't used it, setjmp/longjmp is NOT a better alternative :) It's a bizarre, messy, error-prone way of doing things, but it does at least have the beauty of being... uh... obscure and unreadable? Oh wait. I wanted a beauty. Hm.
Yeah my response was more targeted towards 2nd part of his comment, try catch can't be implemented with just a longjmp, you will still need to unroll the stack and there lies the complexity of exception handling.
View all comments
Show parent comment
96
u/chethelesser Sep 13 '23
Why put so much effort in exception handling when you can just return errors๐