Search code examples
c++exceptionmfcexception-specification

How do I know the exact exception type?


We use CDynamicAccessor which inherits from CAccessorBase. The function MoveNext would throw

HRESULT MoveNext() throw()

but without telling what exception type it is. How do I know it?


Solution

  • No, throw() means the function is declared not to throw any exceptions.

    Note that it's deprecated (and removed in C++20); we can use noexcept (or noexcept(true)) since C++11.