You ask us if you should return error codes from your functions?
Well, it depends on how informative you want to be for your users. If you want to act like software, it usually acts and a modal dialogue appears that says
Something bad happened!
Then there is no need for return codes.
If, however, you want your software to be useful to your users and let them know what happened, then you better provide some kind of diagnostic information (at least error codes). Then you can display a message that says:
I can not open "foo.bar".
Does this file exist? Do you have access to it? Is it part of the network? Maybe I should try again?
source share