15#if defined(__EXCEPTIONS)
23#pragma clang diagnostic ignored "-Wc++98-compat"
24#pragma clang diagnostic ignored "-Wc++98-compat-bind-to-temporary-copy"
39#if defined(__EXCEPTIONS)
41 struct system_error_category :
public std::error_category
44 name () const noexcept override;
47 message (
int i) const override;
52 system_error_category::name () const noexcept
57#pragma GCC diagnostic push
59#pragma clang diagnostic ignored "-Wunused-parameter"
60#elif defined(__GNUC__)
61#pragma GCC diagnostic ignored "-Wunused-parameter"
65 system_error_category::message (
int i)
const
68 return std::string (strerror (i));
70 return std::string (
"");
74 struct cmsis_error_category :
public std::error_category
77 name () const noexcept override;
80 message (
int i) const override;
84 cmsis_error_category::name () const noexcept
89#pragma GCC diagnostic push
91#pragma clang diagnostic ignored "-Wunused-parameter"
92#elif defined(__GNUC__)
93#pragma GCC diagnostic ignored "-Wunused-parameter"
97 cmsis_error_category::message (
int i)
const
100 return std::string (strerror (i));
102 return std::string (
"");
106#pragma GCC diagnostic pop
113#if defined(__EXCEPTIONS)
115 throw std::system_error (std::error_code (ev, system_error_category ()),
126#if defined(__EXCEPTIONS)
128 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,...)