From 4fa6821e0645ff61a9380cd090abff472205c630 Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Sun, 29 Jun 2025 17:16:22 +0100 Subject: add clang-tidy support --- nihil.cli/command_node.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'nihil.cli/command_node.cc') diff --git a/nihil.cli/command_node.cc b/nihil.cli/command_node.cc index 98aeac1..dd18716 100644 --- a/nihil.cli/command_node.cc +++ b/nihil.cli/command_node.cc @@ -9,6 +9,8 @@ module; #include #include +#include + module nihil.cli; import nihil.core; @@ -16,9 +18,14 @@ import nihil.error; namespace nihil { +//NOLINTNEXTLINE(bugprone-exception-escape) command_node::command_node(std::string_view path) noexcept - : m_path(path) +try : m_path(path) { +} catch (std::exception const &exc) { + std::fprintf(stderr, "%s\n", exc.what()); + _exit(1); + /*NOTREACHED*/ } command_node::~command_node() -- cgit v1.2.3