diff options
Diffstat (limited to 'source/fud_assert.cpp')
-rw-r--r-- | source/fud_assert.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/fud_assert.cpp b/source/fud_assert.cpp index 98f17d0..3df6734 100644 --- a/source/fud_assert.cpp +++ b/source/fud_assert.cpp @@ -1,10 +1,11 @@ #include "fud_assert.hpp" -#include "fud_array.hpp" +// #include "fud_array.hpp" #include <climits> #include <cstdio> -#include <format> +#include <exception> +// #include <format> namespace fud { @@ -20,15 +21,18 @@ constexpr auto MAX_LINE_CHARS = BITS_PER_OCTAL * sizeof(decltype(std::source_loc fputs(file_name, stderr); } + /* constexpr std::size_t assertMsgSize = MAX_LINE_CHARS + 3; Array<char, assertMsgSize> buffer{}; static_cast<void>(std::format_to_n(buffer.data(), buffer.size() - 1U, ":{}:", sourceLocation.line())); buffer[buffer.size() - 1] = '\0'; fputs(buffer.data(), stderr); + */ fputs(sourceLocation.function_name(), stderr); fputs(": ", stderr); fputs(assertion, stderr); + fputc('\n', stderr); std::terminate(); } |