3 ms·
I'd be more likely to use setjmp/longjmp to accomplish try/catch in C than goto. Goto is fine for error handling, but exceptions are a bit different, since they
by SAI_Peregrinus 5y ago
I'd be more likely to use setjmp/longjmp to accomplish try/catch in C than goto. Goto is fine for error handling, but exceptions are a bit different, since they have the try/catch/finally structure. Personally I prefer to avoid exceptions, but if I were forced to implement them I'd not use goto!