logoalt Hacker News

qznc • yesterday at 8:37 AM • 1 reply • view on HN

I would not describe exceptions as return values. Speaking in a C context, exceptions are more like "longjmp" than "return".


Replies

jonenst • yesterday at 10:53 AM

They're both ! Exception are definitely viewed as an alternate communication channel. And stack unwinding is one aspect of the communication. See https://nedbatchelder.com/text/exceptions-vs-status#h_valuab... (and many other)