Skip to content

c exception

serhij.zolotukhin edited this page May 10, 2026 · 6 revisions

C language

C does not have built-in exception handling (like try/catch). Instead, C uses return values, global error codes, and helper functions like perror() and strerror().

https://www.geeksforgeeks.org/cpp/cpp-exception-handling-interview-questions-and-answers/

setjmp/longjmp - ?

What is SJLJ: It stands for "setjmp/longjmp", which is a mechanism used for exception handling in C++. It is one of several types of exception handling available in MinGW, alongside DWARF and SEH. https://dev.to/pauljlucas/setjmp-longjmp-and-exception-handling-in-c-1h7h

questioons

  • errno / getlasterror
  • out parameter by pointer
  • iostream - bad bit

URLs

https://www.w3schools.com/c/c_error_handling.php https://www.geeksforgeeks.org/c/error-handling-in-c/

My side bar

Clone this wiki locally