隨筆 - 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)  編輯  收藏

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


          網(wǎng)站導航:
           
          主站蜘蛛池模板: 牙克石市| 逊克县| 玛沁县| 昭觉县| 英德市| 上饶市| 崇阳县| 班玛县| 晋中市| 连城县| 中方县| 会宁县| 微博| 根河市| 视频| 道真| 西宁市| 合山市| 阿合奇县| 志丹县| 视频| 临湘市| 句容市| 扎赉特旗| 喀喇| 新丰县| 杭锦旗| 昌宁县| 乐安县| 柞水县| 吉林省| 临桂县| 孝义市| 西林县| 曲松县| 馆陶县| 苏州市| 宜良县| 娄烦县| 高青县| 云阳县|