Classic example of using setjmp/longjmp for error handling:

https://github.com/pnggroup/libpng/blob/0b0876829d77db0827a8cc2c4326f63be22b2aa1/manuals/libpng-manual.txt#L407