Dear Coders - Rules You Learned in Kindergarten
The first thing every function I've ever written, for every program suite I've created , was to test every gozintas for compliance with its contract. Furthermore, all gozoutas were also examined whether they obeyed the contract. Error codes were generated, fully documented and matching the documentation(!), which returned to the caller as per that contract. Then the error was handled properly without crashing the program or the OS. This is called 'Playing Well With Others' and sometimes 'Sharing.'
I did this in Fortran (multiple flavors), C, C++, more freaking flavors of assembler than I care to recall, and dBase 2-3-3+-4, Clipper,.... The list is extremely long as I never used the same language twice in a row aside from classes at the university. Professionally. Since 1975 when I was 14. Let me repeat that for the numerically challenged: Fourteen.
The only reason to bash your head roundly with this (lovely English phrase that) is I had to figure it out on my own! I didn't do fucking Kindergarten! So please, please, please think about what you are doing. Working with multiple Coders you should have this down pat. That's why we have contracts in the first place. Wikipedia or the OED.
WTF? [Yeah, I keep harping on this, but damn! Downvotes expected.]