来自catch(...)的更多信息 [英] more information from catch(...)

查看:67
本文介绍了来自catch(...)的更多信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用catch(...)获取有关异常的更多信息?

提前Thx

How can i get more information about the exception when using catch(...)?
Thx in advance

推荐答案

Khuong Dinh Pham写道:
Khuong Dinh Pham wrote:
如何在使用catch(...)时获得有关异常的更多信息?
How can i get more information about the exception when using catch(...)?



你可以'' t。


您必须先尝试特定类型的捕获,例如


catch(const std :: exception& e)

{

}

catch(...)

{

}

Ian


You can''t.

You have to try a catch specific typed first, like

catch( const std::exception& e )
{
}
catch( ... )
{
}

Ian


Khuong Dinh Pham写道:
Khuong Dinh Pham wrote:
如何在使用catch时获得有关异常的更多信息(...)?

Thx提前
How can i get more information about the exception when using catch(...)?
Thx in advance




No.


-

Stefan Naewe

naewe.s_AT_atlas_DOT_de



No.

--
Stefan Naewe
naewe.s_AT_atlas_DOT_de


* Khuong Dinh Pham:
* Khuong Dinh Pham:
怎么能我获得了有关异常的更多信息n使用catch(...)?
How can i get more information about the exception when using catch(...)?




您可以重新抛出异常(使用throw;)并再次使用更多

特定的捕获条款。


-

答:因为它弄乱了人们通常阅读文本的顺序。

问:为什么这么糟糕?

A:热门发布。

问:usenet和电子邮件中最烦人的事情是什么?



You can rethrow the exception (using "throw;") and catch it again with more
specific catch clauses.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


这篇关于来自catch(...)的更多信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆