aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.cli/command_node.cc
diff options
context:
space:
mode:
authorLexi Winter <lexi@le-fay.org>2025-06-29 17:16:22 +0100
committerLexi Winter <lexi@le-fay.org>2025-06-29 17:16:22 +0100
commit4fa6821e0645ff61a9380cd090abff472205c630 (patch)
treebd95f13b2dc0bd9692681f50c365d2914a520bfe /nihil.cli/command_node.cc
parente5180acf5f2dfac788e8c12886095ed1ac66fae5 (diff)
downloadnihil-4fa6821e0645ff61a9380cd090abff472205c630.tar.gz
nihil-4fa6821e0645ff61a9380cd090abff472205c630.tar.bz2
add clang-tidy support
Diffstat (limited to 'nihil.cli/command_node.cc')
-rw-r--r--nihil.cli/command_node.cc9
1 files changed, 8 insertions, 1 deletions
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 <print>
#include <string>
+#include <unistd.h>
+
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()