Redian新闻
>
请各位老大分享一下exception的使用经验吧。
avatar
请各位老大分享一下exception的使用经验吧。# DotNet - 窗口里的风景
a*y
1
到底要怎样计划和执行呢?
谢谢。
avatar
L*r
2
typically I only use exceptions for rare happened errors.
Althrough MS said using exceptions would not bring too much performance penalty,
I doubt it. Java will have performance penalty when using exceptions especially
for JIT VMs. You can find infromation from IBM.
If the error is really a "wrong opertions", just use exceptions for good code
management. But don't abuse exceptions. I have seen some guy used exceptions
for the situation that would happen > 20% probability. That's really not
excep

【在 a********y 的大作中提到】
: 到底要怎样计划和执行呢?
: 谢谢。

avatar
a*y
3
Do you plan what exceptions and how many exceptions
before you start coding?
Thx.

【在 L*******r 的大作中提到】
: typically I only use exceptions for rare happened errors.
: Althrough MS said using exceptions would not bring too much performance penalty,
: I doubt it. Java will have performance penalty when using exceptions especially
: for JIT VMs. You can find infromation from IBM.
: If the error is really a "wrong opertions", just use exceptions for good code
: management. But don't abuse exceptions. I have seen some guy used exceptions
: for the situation that would happen > 20% probability. That's really not
: excep

avatar
L*r
4
only plan type, not plan number. hehe.

【在 a********y 的大作中提到】
: Do you plan what exceptions and how many exceptions
: before you start coding?
: Thx.

avatar
a*y
5
oh. Actually, I mean how many types.

【在 L*******r 的大作中提到】
: only plan type, not plan number. hehe.
avatar
L*r
6
depends on how many function models you have.
I like to classify exceptions from their models.
And I always give a way that when end-user administrator
reports us the error message, we can find the exact palce
of that code.
I also wrote exceptions manual in my formal company. :)

【在 a********y 的大作中提到】
: oh. Actually, I mean how many types.
avatar
p*n
7
1) MSDN 上有个关于EXCEPTION MANAGEMENT的APPLICATION BLOCK
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/emab-rm.asp
2) Also, an old but good guide on EXP MGMT
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/exceptdotnet.asp
3) A list of references :
http://www.dotnet247.com/247reference/guide/39.aspx
4) 这本书的第二章,有一段对于EXCEPTION,TRACING,LOGGING比较精辟的论述:
碰巧,AW上的SAMPLE CHAPTER就是这一章.
http://www.awprofessional.com/isapi/product_id~%7B7213929D-3C04-4D0D

【在 a********y 的大作中提到】
: 到底要怎样计划和执行呢?
: 谢谢。

avatar
a*y
8
Thx a lot.【 在 payan (沛岩) 的大作中提到: 】
avatar
p*n
9
hmm, 这本书的配套源代码终于出来了.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。