How should a program handle errors? Example:
A program needs the file text.txt. It must exist and be writable. What should it do if it’s not writable or doesn’t exist? Should it try to chown/chmod the file? Should it try to create it or just display an error message?
Or: Should it try to find a solution or just display an error message?
It’s up to you how to handle it. You have to define your scenarios, user interactions, and other parts of the program. Once you define those it is time to implement and test those scenarios.
Some questions to ask: