C与C++中的异常处理17[6]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 taodm 的 blog

   return 0;

   }

 

    这个例子抛出了一个用户自定义类型(structured_exception)的c++异常。为了让这个例子更具实际意义,也更方便阅读,我将structured_exception的申明放到了头文件structured_exception.h中:

#if !defined inc_structured_exception_

    #define  inc_structured_exception_

 

#include "windows.h"

 

class structured_exception

   {

public:

   structured_exception(exception_pointers const &) throw();

   static void install() throw();

   unsigned what() const throw();

   void const *where() const throw();

private:

   void const *address_;

   unsigned code_;

   };

 

#endif // !defined inc_structured_exception_

本文关键:异常
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top