From 56e6ec4eecd8e162999913f85bb275a4de9593ff Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Fri, 21 Nov 2025 13:43:09 -0600 Subject: [PATCH] fs_stat.hpp --- src/die.hpp | 13 +++++++++++++ src/fs_stat.hpp | 1 + 2 files changed, 14 insertions(+) create mode 100644 src/die.hpp diff --git a/src/die.hpp b/src/die.hpp new file mode 100644 index 00000000..633b22ed --- /dev/null +++ b/src/die.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "fmt/core.h" + +[[noreturn]] +static +inline +void +die(std::string_view msg_) +{ + fmt::println(stderr,"FATAL: {}",msg_); + std::abort(); +} diff --git a/src/fs_stat.hpp b/src/fs_stat.hpp index c3e60c98..160d8621 100644 --- a/src/fs_stat.hpp +++ b/src/fs_stat.hpp @@ -97,6 +97,7 @@ namespace fs return rv; } + die("Should never reach this"); return -ENOENT; } }