News for hackers. Stuff that matters.
Re:Exceptions in C with longjmp and setjmp by notacoward on Thursday September 17, 2015 @03:16PM (#10235457)
If you ever want to have some "fun" try testing an implementation of this. Like the authors and many others, I've also gone down this road of implementing exceptions using longjmp/setjmp. Writing the code was not nearly as hard as writing tests for every permutation of ignoring, catching, rethrowing, finally'ing, and so on through multiple levels. Then the really good part: seeing how your implementation interacts with ucontext-based lightweight threads. I'll leave that one as an exercise for the reader, because I'm evil.

There are no comments on this comment yet.