Skip to content

Commit 640acba

Browse files
authored
Print x.what() of FMT_THROW when exception is disabled (fmtlib#2145)
Signed-off-by: Jiahao XU <[email protected]>
1 parent d8e1c9f commit 640acba

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

include/fmt/format.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ FMT_END_NAMESPACE
123123
# else
124124
# define FMT_THROW(x) \
125125
do { \
126-
static_cast<void>(x); \
127-
FMT_ASSERT(false, ""); \
126+
FMT_ASSERT(false, (x).what()); \
128127
} while (false)
129128
# endif
130129
#endif

0 commit comments

Comments
 (0)