Sponsorised links
This year
java.net: Three Rules for Effective Exception Handling
Article intéressant sur la gestion des exceptions.
Les commentaires ajoutent de nombreux liens :
"Best Practices in EJB Exception Handling"
http://www-106.ibm.com/developerworks/java/library/j-ejbexcept.html
"Best Practices for Exception Handling"
http://www.onjava.com/pub/a/onjava/2003/11/19/exceptions.html
"Designing with Exceptions"
http://www.javaworld.com/jw-07-1998/jw-07-techniques.html
"Exceptions in Java"
http://www.javaworld.com/jw-07-1998/jw-07-exceptions.html
"Exceptional Practices, Part 1"
http://www.javaworld.com/javaworld/jw-08-2001/jw-0803-exceptions.html
"Exceptional Practices, Part 2"
http://www.javaworld.com/javaworld/jw-09-2001/jw-0914-exceptions.html
"When catching exceptions, don't cast your net too wide"
http://www.javaworld.com/javaworld/javatips/jw-javatip134.html
"Use nested exceptions"
http://www.javaworld.com/javaworld/javatips/jw-javatip91.html
"Beware the dangers of generic exceptions"
http://www.javaworld.com/javaworld/jw-10-2003/jw-1003-generics.html
Sponsorised links
2007
2006
pure C# 技術社群 - 找出一千個錯誤
「…軟體作者僅能使用閒暇時間撰寫, 所以不能提供完整支援, 也不保證一定沒有Bug, 如因使用或不能使用本軟體所發生之其他損害,包括營業利益之損失或是造成你上廁所時跌進馬桶等意外,必須由使用者自行負責所有後果…」。
2005
Re: 請問在何種狀況下會考慮使用exception?
就大部分的軟體系統而言,想在程式還沒完成時就知道效率的瓶頸在哪?無異是緣木求魚!在應該使用 Exception 時就使用,在程式還沒正確之前,效率再高都是枉然。
Assertion
Assertion 的使用目的,就是要防止客戶對程式庫的誤用。以 Design by Contract 的原則再加上 OOP 的術語,簡單說來:就是要確保物件在執行操作或行為後還要維持其內部狀態的正確。
1
(13 marks)
