diff options
author | Louis Dionne <ldionne.2@gmail.com> | 2023-07-11 14:40:11 -0400 |
---|---|---|
committer | Louis Dionne <ldionne.2@gmail.com> | 2023-07-17 18:00:03 -0400 |
commit | c9c3cddb5e99a4d73a29580e1ba4cd8165424bab (patch) | |
tree | 8d56677b7d68e5bf5c5ae5f144f025b47dc22e91 /libcxx/include/__format | |
parent | 49b209d5cca3750f71e8a6fda1c5870295ef3a9c (diff) | |
download | llvm-c9c3cddb5e99a4d73a29580e1ba4cd8165424bab.zip llvm-c9c3cddb5e99a4d73a29580e1ba4cd8165424bab.tar.gz llvm-c9c3cddb5e99a4d73a29580e1ba4cd8165424bab.tar.bz2 |
[libc++] Use _LIBCPP_VERBOSE_ABORT in a few remaining __throw_FOO functions
This provides better error messages when the program terminates due to
an exception being thrown in -fno-exceptions mode. Those seem to have
been missed in https://reviews.llvm.org/D141222.
Differential Revision: https://reviews.llvm.org/D154995
Diffstat (limited to 'libcxx/include/__format')
-rw-r--r-- | libcxx/include/__format/format_error.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libcxx/include/__format/format_error.h b/libcxx/include/__format/format_error.h index 5faea1c..f22cb0b 100644 --- a/libcxx/include/__format/format_error.h +++ b/libcxx/include/__format/format_error.h @@ -11,7 +11,7 @@ #define _LIBCPP___FORMAT_FORMAT_ERROR_H #include <__config> -#include <cstdlib> +#include <__verbose_abort> #include <stdexcept> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -40,8 +40,7 @@ __throw_format_error(const char* __s) { #ifndef _LIBCPP_HAS_NO_EXCEPTIONS throw format_error(__s); #else - (void)__s; - _VSTD::abort(); + _LIBCPP_VERBOSE_ABORT("format_error was thrown in -fno-exceptions mode with message \"%s\"", __s); #endif } |