C++
C++ , , : <exception> <stdexcept>. . . <exception><exception> , , . . class exception { public: exception() throw(); exception(const bad_exception &ob) throw(); virtual -exception() throw(); exception &operator=(const exception &ob) throw(); virtual const char *what(() const throw(); }; class bad_exception: public exception { public: bad_exception() throw(); bad_exception(const bad_exception &ob) throw(); virtual ~bad_exception() throw(); bad_exception &operator=(const bad_exception &ob) throw(); virtual const char *what(() const throw(); }; exception - , C++. bad_exception , unexpected(). - what() , . exception - , C++. bad_exception , unexpected(). - what() , . exception . bad_alloc new. bad_typeid typeid. , bad_cast . , exception. , <exception>.
, <exception>.
<stdexcept><stdexcept> , C++ / . , <stdexcept>: ( ). . - . C++ , , logic_error. .
runtime error.
|
2012-09-12 18:07:29 Ann Вот еще примеры работы с исключениями: http://hashcode.ru/questions/135810/c-возможен-ли-вызов-исключения Оставить комментарий: |