惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed

博客园 - Super Sky

2016年了 14年了,离上一篇2年了,做个记号 忙完这段时间后要做的事情 android比赛 计算机前沿技术造就亿万富翁 模板里面的时间(网上找的) javamail 转 异常 xml生成和解析 转载 ibatis 转ibatis多表操作 转载 联合查询 in ibatis 我想出国读硕士了 迅雷在哪里,迅雷在这里 二维游戏开发的点滴 盟军敢死队 用c语言开发游戏 快乐的痛 笑着哭 所谓机遇 顽固文件删除
关于异常
Super Sky · 2011-09-21 · via 博客园 - Super Sky

目前我的理解就是,将错误集中在一起处理。

“当过程遇到一个错误条件...,在某些情况下,过程可能没有处理错误条件的必要信息。但是调用链中的其他程序可能有处理错误条件的必要信息。则应该可能安全的将错误条件传播到可以处理它的外部过程中。”
另外,“从过程返回的代码并没有向调用过程传递很多的信息,它通常是一个数字,指出失败的原因。但是,在许多情况下,如果调用者可以得到关于错误原因的更多信息,则更加有帮助,这将帮助修复错误条件(如果可能)。简单的错误码不能达到这个目的。”
1.  选择Checked还是Unchecked的几个经典依据

2.  Exception的封装问题

3.  如无必要不要创建自己得Exception

4.  不要用Exception来作流程控制

5.  不要轻易的忽略捕获的Exception

6.  不要简单地捕获顶层的Exception”

posted on 2011-09-21 01:10  Super Sky  阅读(198)  评论(0)    收藏  举报