Lines Matching full:exception
1 .. title:: clang-tidy - bugprone-unhandled-exception-at-new
3 bugprone-unhandled-exception-at-new
6 Finds calls to ``new`` with missing exception handler for ``std::bad_alloc``.
10 used. The check verifies that the exception is handled in the function
13 If a nonthrowing version is used or the exception is allowed to propagate out
16 The exception handler is checked if it catches a ``std::bad_alloc`` or
17 ``std::exception`` exception type, or all exceptions (catch-all).
19 ``noexcept`` or may throw an exception of type ``std::bad_alloc`` (or one
20 derived from it). Other exception class types are not taken into account.
25 int *p = new int[1000]; // warning: missing exception handler for allocation failure at 'new'
33 int *p = new int[1000]; // no warning: exception can be handled outside
41 int *p = new int[1000]; // no warning: exception is handled