language agnostic - Error handling. How should a program do it? -


How should a program handle errors? Example:

A program requires a file text.txt . It should be present and should be writable. What if it is not writeable or does not exist? Should you try to burn it? Should it try to create or display only an error message?

Or: should he try to find a solution or just display an error message?

It is up to you how to manage it in your scenario, user interaction, and other parts of the program Must have to define.

  • What data are being written in the file?
  • How important is it that the data is saved?
  • If an error has been reported, who will see the error?
  • If there is a notification of an error, do you have a user response? And what are their options?

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -