c# - How to report standard exceptions to the user? -
consider c# gui application uses filestream
read file, chosen user through "open file" dialog.
in case read fails one of exceptions, correct way report failure user, in user-friendly manner?
should invent own message each of exceptions, or there way of obtaining localized, user-friendly message present verbatim user?
edit
i'm asking whether .net able provide me descriptive string can present (and consistent other .net programs). know can roll own, i'd avoid if there's standard alternative.
you can have set of localizable user exceptions 1 of them being fileuploaderror
. can put localized general information there. throwing few technical details might bit challenging, can quite hard right balance between technical details , simple step user needs take fix error.
my suggestion be:
- have 1 user level
fileuploaderrorexception
- have details property in it
- depending on actual exception, suggest user try few things
Comments
Post a Comment