チケット #18740

Check return codes everywhere

登録: 2009-09-17 01:58 最終更新: 2009-10-06 22:29

報告者:
担当者:
(未割り当て)
チケットの種類:
状況:
オープン
コンポーネント:
(未割り当て)
マイルストーン:
(未割り当て)
優先度:
3
重要度:
5 - 中
解決法:
延期
ファイル:
なし
投票
点数: 0
No votes
0.0% (0/0)
0.0% (0/0)

詳細

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"?

チケットの履歴 (7 件中 3 件表示)

2009-09-17 01:58 更新者: elfring
  • 新しいチケット "Check return codes everywhere" が作成されました
2009-09-26 11:56 更新者: (del#1144)
コメント

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 更新者: elfring
コメント

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 更新者: (del#1144)
コメント

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 更新者: elfring
コメント

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 更新者: (del#1144)
  • チケットの種類バグ から 機能リクエスト に更新されました
  • 優先度5 - 中 から 3 に更新されました
2009-10-06 22:29 更新者: (del#1144)
  • 解決法なし から 延期 に更新されました

添付ファイルリスト

添付ファイルはありません

編集

ログインしていません。ログインしていない状態では、コメントに記載者の記録が残りません。 » ログインする