This is generally better than using return codes.
Depends on what kind of programming you are doing, and what you feel comfortable with. I've found return codes to be better to my taste in most cases.
| [reply] |
You're certainly entitled to do it your own way, but modern programming practice is moving away from return codes to indicate errors and toward exceptions. You can see this in most recent books and in the prominent place exceptions have in recently designed languages.
| [reply] |