Skip to content

Commit

Permalink
Fix deprecated dynamic exception in fboss/agent/hw/bcm/BcmError.h +5 (#…
Browse files Browse the repository at this point in the history
…539)

Summary:
Pull Request resolved: #539

LLVM has detected a violation of `-Wdeprecated-dynamic-exception-spec`. Dynamic exceptions were removed in C++17. This diff fixes the deprecated instance(s).

See [Dynamic exception specification](https://en.cppreference.com/w/cpp/language/except_spec) and [noexcept specifier](https://en.cppreference.com/w/cpp/language/noexcept_spec).

Reviewed By: palmje

Differential Revision: D57636124

fbshipit-source-id: 90ff1837d7d7aa919ea19d380b638a04b7d19adf
  • Loading branch information
r-barnes authored and facebook-github-bot committed May 23, 2024
1 parent f9d1d30 commit e350310
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions fbpcf/exception/exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ParseError : virtual public std::exception {
public:
explicit ParseError(std::string msg) : msg_{msg} {}

const char* what() const throw() override {
const char* what() const noexcept override {
return msg_.c_str();
}

Expand Down Expand Up @@ -65,7 +65,7 @@ class ConstructionError : virtual public std::exception {
public:
explicit ConstructionError(std::string msg) : msg_{msg} {}

const char* what() const throw() override {
const char* what() const noexcept override {
return msg_.c_str();
}

Expand All @@ -83,7 +83,7 @@ class RuntimeTypeError : virtual public std::exception {
public:
explicit RuntimeTypeError(std::string msg) : msg_{msg} {}

const char* what() const throw() override {
const char* what() const noexcept override {
return msg_.c_str();
}

Expand All @@ -102,7 +102,7 @@ class SchemaTraceError : virtual public std::exception {
public:
explicit SchemaTraceError(std::string msg) : msg_{msg} {}

const char* what() const throw() override {
const char* what() const noexcept override {
return msg_.c_str();
}

Expand All @@ -119,7 +119,7 @@ class NotImplementedError : virtual public std::exception {
public:
explicit NotImplementedError(std::string msg) : msg_{msg} {}

const char* what() const throw() override {
const char* what() const noexcept override {
return msg_.c_str();
}

Expand All @@ -135,7 +135,7 @@ class NotSupportedError : virtual public std::exception {
public:
explicit NotSupportedError(std::string msg) : msg_{msg} {}

const char* what() const throw() override {
const char* what() const noexcept override {
return msg_.c_str();
}

Expand All @@ -153,7 +153,7 @@ class InvalidAccessError : virtual public std::exception {
public:
explicit InvalidAccessError(std::string msg) : msg_{msg} {}

const char* what() const throw() override {
const char* what() const noexcept override {
return msg_.c_str();
}

Expand Down

0 comments on commit e350310

Please sign in to comment.