14#if defined(__EXCEPTIONS)
22#pragma clang diagnostic ignored "-Wc++98-compat"
23#pragma clang diagnostic ignored "-Wc++98-compat-bind-to-temporary-copy"
38#if defined(__EXCEPTIONS)
40 struct system_error_category :
public std::error_category
43 name () const noexcept override;
46 message (
int i) const override;
50 system_error_category::name () const noexcept
55#pragma GCC diagnostic push
57#pragma clang diagnostic ignored "-Wunused-parameter"
58#elif defined(__GNUC__)
59#pragma GCC diagnostic ignored "-Wunused-parameter"
63 system_error_category::message (
int i)
const
66 return std::string (strerror (i));
68 return std::string (
"");
72 struct cmsis_error_category :
public std::error_category
75 name () const noexcept override;
78 message (
int i) const override;
82 cmsis_error_category::name () const noexcept
87#pragma GCC diagnostic push
89#pragma clang diagnostic ignored "-Wunused-parameter"
90#elif defined(__GNUC__)
91#pragma GCC diagnostic ignored "-Wunused-parameter"
95 cmsis_error_category::message (
int i)
const
98 return std::string (strerror (i));
100 return std::string (
"");
104#pragma GCC diagnostic pop
111#if defined(__EXCEPTIONS)
115 throw std::system_error (std::error_code (ev, system_error_category ()),
126#if defined(__EXCEPTIONS)
130 throw std::system_error (std::error_code (ev, cmsis_error_category ()),
void __throw_system_error(int ev, const char *what_arg)
void __throw_cmsis_error(int ev, const char *what_arg)
Single file µOS++ RTOS definitions.
int trace_printf(const char *format,...)