An exception is an object that reports an error. A throw expression throw e; stops the current function and starts the search for a handler. A try block is followed by one or more handlers catch (const T &x) {body}: the first handler, in order, whose type T is the type of the exception or one of its base classes catches it. catch (...) catches anything, and throw; inside a handler throws the same exception again. If no handler catches it, the program ends.
书籍暂未推出简体中文版——当前显示英文版。
Computer Science · 术语表
什么是 Exception, throw, handler?
又称: exception (C++) · throw expression · handler (exception)