Difetti relativi alle eccezioni in C++
Difetti relativi alle eccezioni in C++ e loro gestione, come eccezioni non gestite in una funzione 
noexcept o eccezioni impreviste generate da un'istruzione throwQuesti difetti sono relativi alla gestione delle eccezioni in C++. I difetti includono:
- Eccezione non gestita generata da una funzione - noexcept
- Eccezione imprevista che si verifica durante la costruzione dell'oggetto argomento di un'istruzione - throw
- Istruzioni - catchche intercettano le eccezioni per valore anziché per riferimento
- Istruzioni - catchche nascondono dichiarazioni- catchsuccessive.
Risultati di Polyspace
| Exception caught by value | catchstatement accepts an object by
value | 
| Exception handler hidden by previous
            handler | catchstatement is not reached because
of an earliercatchstatement for the same exception | 
| Noexcept function
            exits with exception | Functions specified as noexcept,noexcept(true)ornoexcept(<true condition>)exits with an exception, which causes abnormal termination of program execution, leading to
      resource leak and security vulnerability | 
| Throw argument raises
            unexpected exception | The argument expression in a throwstatement raises unexpected
      exceptions, leading to resource leaks and security vulnerabilities | 
| Uncaught
            exception | An exception is raised from a function but it is not caught and handled (Da R2022b) | 
| Throw argument
            expression calls new | The argument expression in a throwstatement allocates memory by
      callingnew, which can result in abrupt termination of the program and
      resource leaks (Da R2023b) | 
Argomenti
- Bug Finder Defect GroupsThe Bug Finder defect checkers are classified into groups such as data flow, concurrency, numerical, and so on.