diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index 25cb60b0..1b53d0a7 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -60,12 +60,12 @@ Error::Error(int result) : result(result) { } -const char *Error::what() const throw() +const char *Error::what() const noexcept { return sr_strerror(result); } -Error::~Error() throw() +Error::~Error() noexcept { } diff --git a/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp b/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp index e93a5fb5..c36ee292 100644 --- a/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp +++ b/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp @@ -121,9 +121,9 @@ class SR_API Error: public exception { public: explicit Error(int result); - ~Error() throw(); + ~Error() noexcept; const int result; - const char *what() const throw(); + const char *what() const noexcept; }; /* Base template for classes whose resources are owned by a parent object. */