setjmp and longjmp
摘要
Although C doesn’t have exceptions, its standard library includes two functions, setjmp and longjmp, that can be used together to return through more than one level of the call stack, typically as an error-handling mechanism when there’s no other way for a deeply nested function to stop and return an error. This chapter covers those functions.