Skip to content

Commit

Permalink
Merge pull request #46388 from iarspider/iarspider-patches-20241015-1
Browse files Browse the repository at this point in the history
[Core] Mark cms::Exception and edm::Exception functions that throw exceptions as noreturn
  • Loading branch information
cmsbuild authored Oct 18, 2024
2 parents 4694d77 + 17fb372 commit 2f9b38f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions FWCore/Utilities/interface/EDMException.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,18 @@ namespace edm {

static const std::string& codeToString(Code);

static void throwThis(Code category,
char const* message0 = "",
char const* message1 = "",
char const* message2 = "",
char const* message3 = "",
char const* message4 = "");
static void throwThis(Code category, char const* message0, int intVal, char const* message2 = "");
[[noreturn]] static void throwThis(Code category,
char const* message0 = "",
char const* message1 = "",
char const* message2 = "",
char const* message3 = "",
char const* message4 = "");
[[noreturn]] static void throwThis(Code category, char const* message0, int intVal, char const* message2 = "");

Exception* clone() const override;

private:
void rethrow() override;
[[noreturn]] void rethrow() override;
int returnCode_() const override;

Code category_;
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Utilities/interface/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ namespace cms {

private:
void init(std::string const& message);
virtual void rethrow();
[[noreturn]] virtual void rethrow();
virtual int returnCode_() const;

// data members
Expand Down

0 comments on commit 2f9b38f

Please sign in to comment.