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

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

本文简介:选择自 taodm 的 blog

 

void structured_exception::install() throw()

   {

   _set_se_translator(my_translator);

   }

 

unsigned structured_exception::what() const throw()

   {

   return code_;

   }

 

void const *structured_exception::where() const throw()

   {

   return address_;

   }

 

    这些函数的意义是:

l         my_translator()是异常转换函数。我把它从main文件中移到这儿。于是,main文件不再需要包含windows.h了。

l         install()将运行器库的全局转换函数设置为my_translator()

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

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

go top