You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just giving the class name is not really useful for the user. Otherwise it is a lot of work for a programmer to get all the details out of the exact exception type (or even list all of them in catch clauses).
Proposed solutions:
If support for C++11 is available: Inherit from std::runtime_error and use delegating constructors to initialize it with the correct error message (e.g. depending on path etc.).
Otherwise: Add a protected std::string member to class ConfigException and after all members are initialized set it to the error message for the particular class.
I will probably look into this myself, if you accept pull requests.
The text was updated successfully, but these errors were encountered:
Just giving the class name is not really useful for the user. Otherwise it is a lot of work for a programmer to get all the details out of the exact exception type (or even list all of them in catch clauses).
Proposed solutions:
std::runtime_error
and use delegating constructors to initialize it with the correct error message (e.g. depending on path etc.).std::string
member to classConfigException
and after all members are initialized set it to the error message for the particular class.I will probably look into this myself, if you accept pull requests.
The text was updated successfully, but these errors were encountered: