diff --git a/src/btop_cli.cpp b/src/btop_cli.cpp index bf1b4d97..f867ca6e 100644 --- a/src/btop_cli.cpp +++ b/src/btop_cli.cpp @@ -124,6 +124,9 @@ namespace Cli { } catch (std::invalid_argument& e) { error("Preset must be a positive number"); return OrRetCode { 1 }; + } catch (std::out_of_range& e) { + error(fmt::format("Preset argument is out of range: {}", arg.data())); + return OrRetCode { 1 }; } continue; } @@ -141,6 +144,9 @@ namespace Cli { } catch (std::invalid_argument& e) { error("Update must be a positive number"); return OrRetCode { 1 }; + } catch(std::out_of_range& e) { + error(fmt::format("Update argument is out of range: {}", arg.data())); + return OrRetCode { 1 }; } continue; }