diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-20 10:48:19 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-20 10:48:19 -0500 |
commit | 6a27a2a4032e88fa9154ef0f0741edc584f7a701 (patch) | |
tree | 92ca58cbcdd2c1d11b7d69deb0d4925d0f979a3f /source/fud_assert.cpp | |
parent | e94db4695e236b42ae1be44b2605075161d5144f (diff) |
Lots of work.
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(); } |