Idioms for error handling in C

Christopher Preschern · 2015

Error handling is a big part of writing software and when done poorly, the software becomes difficult to extend and to maintain. Programming languages like C++ or Java provide "Exceptions" and destructors which make error handling easier. Such mechanisms are not natively available for the C programming language and literature on good error handling in C is well scattered over the Internet. This paper presents collected knowledge on good error handling in form of C error handling idioms. Part of the idioms were directly found on the Internet and part of them were discovered by online and offline discussions on C error handling best practice.

Read the paper · More papers on PaperTik