summaryrefslogtreecommitdiff
path: root/src/fs/AllocatedPath.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-12-19 10:56:23 +0100
committerMax Kellermann <max@musicpd.org>2017-12-19 10:56:23 +0100
commit914df18bf93369d279fff85f87c4ac8524f32540 (patch)
treeb73edeeb37923be1c124e608423ad3b5da068958 /src/fs/AllocatedPath.cxx
parenta539094c06114a6be862e219bfc03d6a3513d80b (diff)
Main, ...: catch any exception, not just std::runtime_error
Diffstat (limited to 'src/fs/AllocatedPath.cxx')
-rw-r--r--src/fs/AllocatedPath.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fs/AllocatedPath.cxx b/src/fs/AllocatedPath.cxx
index 0bf2ba4ad..ffa307905 100644
--- a/src/fs/AllocatedPath.cxx
+++ b/src/fs/AllocatedPath.cxx
@@ -23,7 +23,7 @@
#include "Charset.hxx"
#include "Compiler.h"
-#include <stdexcept>
+#include <exception>
/* no inlining, please */
AllocatedPath::~AllocatedPath() {}
@@ -34,7 +34,7 @@ AllocatedPath::FromUTF8(const char *path_utf8) noexcept
#if defined(HAVE_FS_CHARSET) || defined(_WIN32)
try {
return AllocatedPath(::PathFromUTF8(path_utf8));
- } catch (const std::runtime_error &) {
+ } catch (...) {
return nullptr;
}
#else
@@ -63,7 +63,7 @@ AllocatedPath::ToUTF8() const noexcept
{
try {
return ::PathToUTF8(c_str());
- } catch (const std::runtime_error &) {
+ } catch (...) {
return std::string();
}
}