From d3759c0b4957b7e0845ec64772489dfac83da54f Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Tue, 14 Jan 2025 13:14:32 +0100 Subject: [PATCH] Revert "Update error handling" This reverts commit 872b8debac1faaba3d8f47b390b9ac1aa30a777d. --- cpp/shared/s2p_util.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpp/shared/s2p_util.cpp b/cpp/shared/s2p_util.cpp index 085a17ab..b370073e 100644 --- a/cpp/shared/s2p_util.cpp +++ b/cpp/shared/s2p_util.cpp @@ -158,7 +158,10 @@ int s2p_util::ParseAsUnsignedInt(const string &value) try { return static_cast(stoul(value)); } - catch (...) { + catch (const invalid_argument&) { + return -1; + } + catch (const out_of_range&) { return -1; } }