summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-12-19 10:54:49 +0100
committerMax Kellermann <max@musicpd.org>2017-12-21 10:22:04 +0100
commit43ec96d4a0b90179b60cf92698ea90f9248124c5 (patch)
treef4009436836354b3fe136cf32f5c26f47d5fe1c7 /src
parent3d1d779da7112ea3d08217f37cac8fcba78a9808 (diff)
command/Error: translate std::{length_error,out_of_range} to ACK_ERROR_ARG
Diffstat (limited to 'src')
-rw-r--r--src/command/CommandError.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/command/CommandError.cxx b/src/command/CommandError.cxx
index 8f5badb4d..d12d4a4ec 100644
--- a/src/command/CommandError.cxx
+++ b/src/command/CommandError.cxx
@@ -123,6 +123,10 @@ ToAck(std::exception_ptr ep) noexcept
return ACK_ERROR_SYSTEM;
} catch (const std::invalid_argument &e) {
return ACK_ERROR_ARG;
+ } catch (const std::length_error &e) {
+ return ACK_ERROR_ARG;
+ } catch (const std::out_of_range &e) {
+ return ACK_ERROR_ARG;
#ifdef GLIBCXX_49X
} catch (const std::exception &e) {
#else