There are no exceptions in C. In C the errors are notified by the returned value of the function, the exit value of the process, signals to the process (Program Error Signals (GNU libc)) or the CPU hardware interruption (or other notification error form the CPU if there is)(How processor handles the case of division by zero).

Exceptions are defined in C++ and other languages though. Exception handling in C++ is specified in the C++ standard "S.15 Exception handling", there is no equivalent section in the C standard.

Answer from Brian R. Bondy on Stack Overflow
🌐
Cplusplus
cplusplus.com › doc › tutorial › exceptions
Exceptions
Exceptions provide a way to react to exceptional circumstances (like runtime errors) in programs by transferring control to special functions called handlers. To catch exceptions, a portion of code is placed under exception inspection. This is done by enclosing that portion of code in a try-block.
🌐
GeeksforGeeks
geeksforgeeks.org › c language › error-handling-in-c
Error Handling in C - GeeksforGeeks
August 6, 2025 - Since C does not provide built-in exception handling like other high-level languages (e.g., try-catch in Java or Python), error handling relies heavily on function return values, global variables, and system calls.
🌐
GitHub
github.com › ThrowTheSwitch › CException
GitHub - ThrowTheSwitch/CException: Lightweight exception implementation for C
Throws should only occur from within a protected (Try...Catch) block, though it may easily be nested many function calls deep without an impact on performance or functionality. Throw takes a single argument, which is an exception id which will be passed to Catch as the reason for the error.
Starred by 355 users
Forked by 69 users
Languages   C 96.6% | Meson 3.4%
🌐
Princeton
cs.princeton.edu › courses › archive › spr04 › cos217 › lectures › Exceptions.pdf pdf
1 Exceptions CS 217 2 Handling Errors in C • Return errors from a function
jump to the “catch” address · libc · stack frame · main() stack frame · foo() stack frame · 0x0 · Exception1 · Exception2 · main · catch · text · ... 7 · More Implementation Considerations · • Two kinds of exceptions · o User defined · o Predefined ·
🌐
On-time
on-time.com › ddj0011.htm
Exception Handling in C Without C++
This page describes a simple method of implementing C++ like exception handling in ANSI C. Originally published in Dr. Dobb's Journal, November 2000.
🌐
GeeksforGeeks
geeksforgeeks.org › c++ › exception-handling-c
Exception Handling in C++ - GeeksforGeeks
Throwing an Exception: When an error or unexpected situation occurs, the program uses the throw keyword to signal an exception. Catching an Exception: The program searches for a matching catch block to intercept and handle the thrown exception.
Published   October 7, 2025
🌐
Cppreference
en.cppreference.com › w › cpp › language › exceptions
Exceptions - cppreference.com
While objects of any complete type and cv pointers to void may be thrown as exception objects, all standard library functions throw unnamed objects by value, and the types of those objects are derived (directly or indirectly) from std::exception.
Find elsewhere
🌐
DataFlair
data-flair.training › blogs › error-handling-in-c
Error Handling in C - Learn to Deal with Exceptions - DataFlair
August 3, 2021 - The C programming language does not support exception handling nor error handling. It is an additional feature offered by C. In spite of the absence of this feature, there are certain ways to implement error handling in C. Generally, in case ...
🌐
Wikibooks
en.wikibooks.org › wiki › C_Programming › Error_handling
C Programming/Error handling - Wikibooks, open books for an open world
January 20, 2005 - C does not provide direct support for error handling (also known as exception handling). By convention, the programmer is expected to prevent errors from occurring in the first place, and test return values from functions. For example, -1 and NULL are used in several functions such as socket() ...
🌐
W3Schools
w3schools.com › c › c_error_handling.php
C Error Handling
Unlike some languages, C does not have built-in exception handling (like try/catch).
🌐
Infinitive Host
infinitivehost.com › knowledge-base › how-to-throw-an-exception-in-c-comprehensive-guide
How to Throw an Exception in C - Comprehensive Guide
May 21, 2024 - In C, the language does not have built-in support for exceptions as seen in languages like C++ or Java.
🌐
GitHub
github.com › tliron › exceptional-c-exceptions
GitHub - tliron/exceptional-c-exceptions: Exceptional C Exceptions
You can access the cause of any exception using e->cause recursively. It will be null if there is no cause. There is also a rethrowe variant for throwing the exact explicit exception instance without any nesting.
Author   tliron
🌐
Rollbar
rollbar.com › home › throwing exceptions in c++
Throwing Exceptions in C++ | Rollbar
March 1, 2025 - Exceptions provide a formal and well-defined way for detecting errors and to pass the information up the call stack.
🌐
Cppreference
en.cppreference.com › w › cpp › error › exception.html
std::exception - cppreference.com
Provides consistent interface to handle errors through the throw expression. All exceptions generated by the standard library inherit from std::exception.
🌐
IBM
ibm.com › docs › en › zos › 3.1.0
Exception occurs in C
We cannot provide a description for this page right now
🌐
IBM
ibm.com › docs › en › cics-ts › 6.x
An example of exception handling in C
This example is a typical function which could be used to receive a BMS map and to cope with exception conditions.
🌐
Microsoft Learn
learn.microsoft.com › en-us › cpp › c-language › try-except-statement-c
try-except statement (C) | Microsoft Learn
You can try changing directories. ... The try-except statement is a Microsoft extension to the C language that enables applications to gain control of a program when events that normally terminate execution occur.