隨筆 - 9  文章 - 12  trackbacks - 0
          <2006年12月>
          262728293012
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          常用鏈接

          留言簿(2)

          隨筆檔案

          相冊

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          1. Handle problems at the appropriate level. (Avoid catching exceptions unless you know what to do with them).
          2. Fix the problem and call the method that caused the exception again.
          3. Patch things up and continue without retrying the method.
          4. Calculate some alternative result instead of what the method was supposed to produce.
          5. Do whatever you can in the current context and rethrow the same exception to a higher context.
          6. Do whatever you can in the current context and throw a different exception to a higher context.
          7. Terminate the program.
          8. Simplify. (If your exception scheme makes things more complicated, then it is painful and annoying to use.)
          9. Make your library and program safer. (This is a short-term investment for debugging, and a long-term investment for application robustness.)
          posted on 2006-12-07 14:59 人生如戲 閱讀(252) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 霍州市| 河曲县| 北海市| 班玛县| 东至县| 蓝田县| 庆元县| 久治县| 东山县| 长寿区| 旺苍县| 扎兰屯市| 叙永县| 澄江县| 洪江市| 岳阳县| 张家界市| 和平县| 金门县| 新巴尔虎右旗| 平江县| 湘乡市| 呼伦贝尔市| 芦溪县| 托克逊县| 博白县| 平陆县| 渝中区| 贵港市| 岢岚县| 小金县| 黄大仙区| 泸州市| 搜索| 昌图县| 池州市| 揭西县| 普宁市| 陆丰市| 平远县| 六安市|