Ticket #18740

Check return codes everywhere

Date d'ouverture: 2009-09-17 01:58 Dernière mise à jour: 2009-10-06 22:29

Rapporteur:
Propriétaire:
(Aucun)
État:
Ouvert
Composant:
(Aucun)
Jalon:
(Aucun)
Priorité:
3
Sévérité:
5 - moyen
Résolution:
Postponed
Fichier:
Aucun
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Détails

Some checks for return codes are missing.

Examples:
Would you like to add more error handling for return values from "WriteFile" like in the function "CommentLogToFile" and from "GetModuleFileName" in the function "GetUILanguageFile"?

Ticket History (3/7 Histories)

2009-09-17 01:58 Updated by: elfring
  • New Ticket "Check return codes everywhere" created
2009-09-26 11:56 Updated by: (del#1144)
Commentaire

How do you think a user hope which behavior?

(1) check the error and pop up MessageBox(modal), interrupt user operation.
(2) check the error and not notify to user.

2009-09-26 18:56 Updated by: elfring
Commentaire

Situations might happen where users can not be notified about the unexpected "thing" by a message box.

Usual software design options are described in the article "Exception Handling Alternatives" by Detlef Vollmann.

I suggest to avoid unchecked function calls. Would you like to detect every error situation as early as possible?

2009-09-29 12:18 Updated by: (del#1144)
Commentaire

I read your suggestion as "detect every error at every function call."

It is in the right. And it takes labor and time to check them.

2009-09-29 19:05 Updated by: elfring
Commentaire

You do not need to make assumptions about error situations. Please check all error codes. Otherwise, it might not be noticed if anything unexpected went wrong.

Would you like to reduce the efforts for error code checking by an exception class hierarchy?

2009-10-06 22:28 Updated by: (del#1144)
  • Type Update from Bogues to Demandes de fonctionnalités
  • Priorité Update from 5 - moyen to 3
2009-10-06 22:29 Updated by: (del#1144)
  • Résolution Update from Aucun to Postponed

Attachment File List

No attachments

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion