mirror of
https://github.com/fmtlib/fmt.git
synced 2024-09-19 12:29:56 +00:00
FMT_EXCEPTIONS -> FMT_USE_EXCEPTIONS
This commit is contained in:
parent
89999f1672
commit
b6a6ec7f1c
@ -144,16 +144,16 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Check if exceptions are disabled.
|
// Check if exceptions are disabled.
|
||||||
#ifdef FMT_EXCEPTIONS
|
#ifdef FMT_USE_EXCEPTIONS
|
||||||
// Use the provided definition.
|
// Use the provided definition.
|
||||||
#elif defined(__GNUC__) && !defined(__EXCEPTIONS)
|
#elif defined(__GNUC__) && !defined(__EXCEPTIONS)
|
||||||
# define FMT_EXCEPTIONS 0
|
# define FMT_USE_EXCEPTIONS 0
|
||||||
#elif FMT_MSC_VERSION && !_HAS_EXCEPTIONS
|
#elif FMT_MSC_VERSION && !_HAS_EXCEPTIONS
|
||||||
# define FMT_EXCEPTIONS 0
|
# define FMT_USE_EXCEPTIONS 0
|
||||||
#else
|
#else
|
||||||
# define FMT_EXCEPTIONS 1
|
# define FMT_USE_EXCEPTIONS 1
|
||||||
#endif
|
#endif
|
||||||
#if FMT_EXCEPTIONS
|
#if FMT_USE_EXCEPTIONS
|
||||||
# define FMT_TRY try
|
# define FMT_TRY try
|
||||||
# define FMT_CATCH(x) catch (x)
|
# define FMT_CATCH(x) catch (x)
|
||||||
#else
|
#else
|
||||||
|
@ -129,7 +129,7 @@ FMT_FUNC auto write_loc(appender out, loc_value value,
|
|||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
||||||
FMT_FUNC void report_error(const char* message) {
|
FMT_FUNC void report_error(const char* message) {
|
||||||
#if FMT_EXCEPTIONS
|
#if FMT_USE_EXCEPTIONS
|
||||||
throw format_error(message);
|
throw format_error(message);
|
||||||
#else
|
#else
|
||||||
fputs(message, stderr);
|
fputs(message, stderr);
|
||||||
|
@ -122,7 +122,7 @@ template <> struct iterator_traits<fmt::appender> {
|
|||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
#ifndef FMT_THROW
|
#ifndef FMT_THROW
|
||||||
# if FMT_EXCEPTIONS
|
# if FMT_USE_EXCEPTIONS
|
||||||
# if FMT_MSC_VERSION || defined(__NVCC__)
|
# if FMT_MSC_VERSION || defined(__NVCC__)
|
||||||
FMT_BEGIN_NAMESPACE
|
FMT_BEGIN_NAMESPACE
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
Loading…
Reference in New Issue
Block a user