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

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
Spread Privacy
Spread Privacy
I
InfoQ
V
V2EX
S
Schneier on Security
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
C
Cybersecurity and Infrastructure Security Agency CISA
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
Latest news
Latest news
S
Secure Thoughts
Project Zero
Project Zero
MongoDB | Blog
MongoDB | Blog
I
Intezer
Security Latest
Security Latest
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
N
Netflix TechBlog - Medium
V2EX - 技术
V2EX - 技术
量子位
T
Threatpost
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
T
Tor Project blog
A
Arctic Wolf
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
博客园 - Franky
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
L
LINUX DO - 热门话题

博客园 - 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)    收藏  举报