codeql-coding-standards icon indicating copy to clipboard operation
codeql-coding-standards copied to clipboard

`A15-1-3`: Detection of duplicated exceptions on function templates

Open nbusser opened this issue 9 months ago • 1 comments

Affected rules

  • A15-1-3

Description

When defining a function template which throws an exception, A15-1-3 warning is triggered, meaning that the exception is not unique.

Example

template <typename T>
void false_positive() {
  throw std::runtime_error{"message"}; // Triggers A15-1-3 warning
}

nbusser avatar Jun 01 '24 17:06 nbusser