Skip to content

Exception objects must be nothrow copy constructible (ERR60-CPP) #531

@nlohmann

Description

@nlohmann

The SEI CERT C++ Coding Standard states in ERR60-CPP:

If the copy constructor for the exception object type throws during the copy initialization, std::terminate() is called, which can result in undefined behavior.

The user-defined exceptions all base on detail::exception which has a std::string member. The exceptions have to be refactored to satisfy std::is_nothrow_copy_constructible.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions