From a539094c06114a6be862e219bfc03d6a3513d80b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 19 Dec 2017 10:54:49 +0100 Subject: [PATCH] command/Error: translate std::{length_error,out_of_range} to ACK_ERROR_ARG --- src/command/CommandError.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/command/CommandError.cxx b/src/command/CommandError.cxx index 2834b2bf5..be2c90d86 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