Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3694: First letter of error messages should be in uppercase
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-12-06 14:39:40
#3694: First letter of error messages should be in uppercase
--------------------------------------------------+-------------------------
Reporter: Vadim Guchenko <techmsgs@â¦> | Owner: vladimir_prus
Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: program_options
Version: Boost 1.40.0 | Severity: Cosmetic
Keywords: |
--------------------------------------------------+-------------------------
Comment(by Vadim Guchenko <techmsgs@â¦>):
Replying to [comment:5 s_ochsenknecht]:
> You're talking about the messages/strings returned by the what()
function of the related exception type. These strings are NOT meant to
give an error message to user. Of course you can use them, but you don't
have control over them (localisation etc.).
I disagree with you. I always use text messages from exceptions and output
them to the log/console, optionally adding some prefix. I examine the
exception class only when I need to do some work dependent on the class.
Localization is a task of the library, not of the user application. The
user may only choose what locale to use.
Moreover, the same exception class is often used in different contexts to
throw exceptions with different text messages. Such text messages may
contain information that cannot be gotten from the exception class (for
instance, the name of the option which caused a error).
> The use of different exception types/classes enables you to generate
your own error messages which fit in your environment/application.
> You catch the exception and depending on the catched type you generate
an error/warning/message or whatever to the user.
Do you suggest to catch every possible exception class in the application
in order to give some adapted error message to the user? That is wrong
approach.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3694#comment:6> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC