
blog.oddbit.com/post/2023-02-17-c-error-handling
Preview meta tags from the blog.oddbit.com website.
Linked Hostnames
6- 7 links toblog.oddbit.com
- 3 links togithub.com
- 2 links togcc.gnu.org
- 1 link tohachyderm.io
- 1 link tooddbit.com
- 1 link totwitter.com
Thumbnail

Search Engine Appearance
Simple error handling in C
Overview I was recently working with someone else’s C source and I wanted to add some basic error checking without mucking up the code with a bunch of if statements and calls to perror. I ended up implementing a simple must function that checks the return value of an expression, and exits with an error if the return value is less than 0. You use it like this: must(fd = open("textfile.txt", O_RDONLY)); Or:
Bing
Simple error handling in C
Overview I was recently working with someone else’s C source and I wanted to add some basic error checking without mucking up the code with a bunch of if statements and calls to perror. I ended up implementing a simple must function that checks the return value of an expression, and exits with an error if the return value is less than 0. You use it like this: must(fd = open("textfile.txt", O_RDONLY)); Or:
DuckDuckGo

Simple error handling in C
Overview I was recently working with someone else’s C source and I wanted to add some basic error checking without mucking up the code with a bunch of if statements and calls to perror. I ended up implementing a simple must function that checks the return value of an expression, and exits with an error if the return value is less than 0. You use it like this: must(fd = open("textfile.txt", O_RDONLY)); Or:
General Meta Tags
8- titleSimple error handling in C :: blog.oddbit.com
- charsetutf-8
- viewportwidth=device-width,initial-scale=1
- descriptionOverview I was recently working with someone else’s C source and I wanted to add some basic error checking without mucking up the code with a bunch of if statements and calls to perror. I ended up implementing a simple must function that checks the return value of an expression, and exits with an error if the return value is less than 0. You use it like this: must(fd = open("textfile.txt", O_RDONLY)); Or:
- keywords
Open Graph Meta Tags
9- og:localeen
- og:typearticle
- og:titleSimple error handling in C
- og:descriptionOverview I was recently working with someone else’s C source and I wanted to add some basic error checking without mucking up the code with a bunch of if statements and calls to perror. I ended up implementing a simple must function that checks the return value of an expression, and exits with an error if the return value is less than 0. You use it like this: must(fd = open("textfile.txt", O_RDONLY)); Or:
- og:urlhttps://blog.oddbit.com/post/2023-02-17-c-error-handling/
Twitter Meta Tags
1- twitter:cardsummary
Link Tags
5- apple-touch-iconhttps://blog.oddbit.com/img/theme-colors/orange.png
- canonicalhttps://blog.oddbit.com/post/2023-02-17-c-error-handling/
- shortcut iconhttps://blog.oddbit.com/img/theme-colors/orange.png
- stylesheethttps://blog.oddbit.com/styles.css
- stylesheethttps://blog.oddbit.com/style.css
Links
15- https://blog.oddbit.com
- https://blog.oddbit.com/archive
- https://blog.oddbit.com/post/2023-02-17-c-error-handling
- https://blog.oddbit.com/posts
- https://blog.oddbit.com/rss.xml