Programs are robust, not because they never encounter errors, but because they implement processing for validation and error handling.
-
Always validate user input and provide help for the user to correctly supply input.
-
Validate directory and file operations by checking stream state after each stream operation. Throw meaningful exception messages
when errors occur.