Noreturn
Noreturn refers to a property of a function indicating that it does not return to the caller. When such a function is invoked, control flow ends at the function, typically by terminating the program, throwing an exception in languages that use exceptions, or transferring control elsewhere in a non-returning manner. The concept is important for both correctness and optimization, as compilers can assume that code following a noreturn call is unreachable.
In different languages and environments, noreturn is expressed with several syntaxes. In C11 and later, a function
Notes and caveats include that noreturn is a promise by the programmer or standard library implementer. If
Common uses include terminating a program path after reporting an unrecoverable error, ending a thread, or