Subject: [Boost-bugs] [Boost C++ Libraries] #9190: boost::filesystem::extension(...) throws runtime_error if the locale is unknown.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-02 06:13:37
#9190: boost::filesystem::extension(...) throws runtime_error if the locale is
unknown.
------------------------------+------------------------
Reporter: mkm@⦠| Owner: bemandawes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
Version: Boost 1.54.0 | Severity: Problem
Keywords: |
------------------------------+------------------------
Running the following program gives an std::runtime_error if the locale is
set to something which the system doesn't support.
{{{
#include <boost/filesystem.hpp>
int main() { boost::filesystem::extension("test.txt"); }
}}}
{{{
> LC_CTYPE=unknown ./a.out
> terminate called after throwing an instance of 'std::runtime_error'
> what(): locale::facet::_S_create_c_locale name not valid
> Aborted
}}}
This is reproducible on debian testing and ubuntu 12.04 but I think it's a
general issue.
1. Is it the right behavior to throw an exception?
2. If it should throw an exception, it should have been of type
filesystem_error.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9190> 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:14 UTC