Development code for gracefully handling errors in C