隨筆-1  評(píng)論-68  文章-98  trackbacks-0
          Java有2類錯(cuò)誤類:error和exception。下圖是Java錯(cuò)誤類的結(jié)構(gòu)圖:



          exception比較好捕獲,error就比較難捕獲了,如OutOfMemoryError和StackOverflowError。
          下面列出幾種常見(jiàn)的error表述:

          Error?????????????????????????????????Package??????Description

          Error?????????????????????????????java.lang??????Error is the parent class for all other error objects.

          NoClassDefFoundError??????java.lang??????A class definition could not be found.

          NoSuchFieldError??????????????java.lang??????A specified field could not be found.

          NoSuchMethodError??????????java.lang??????A specified method could not be found.

          OutOfMemoryError???????????java.lang???????The Java Virtual Machine that you're running has run out of memory.

          StackOverflowError???????????java.lang??????The memory stack is full. You are calling programs too deep, or using too large (or too many) variables in your path of execution.

          VirtualMachineError????????????java.lang??????VirtualMachineError is the parent class to several serious environment errors. It indicates that some serious resource problem exists on the host Java machine.

          摘自《Java Error Handling》 http://www.nd.edu/~cwood1/teaching/java/JavaErrors.htm

          最近整理、測(cè)試程序中,遇到了不少異常和錯(cuò)誤,附上相關(guān)的web資源:

          Sun Tutorial on Exceptions -- Lesson: Handling Errors with Exceptions
          http://java.sun.com/docs/books/tutorial/essential/exceptions/

          Exceptions in Java (by Bill Venners)
          http://www.javaworld.com/javaworld/jw-07-1998/jw-07-exceptions.html

          Designing with exceptions (by Bill Venners)
          http://www.javaworld.com/javaworld/jw-07-1998/jw-07-techniques_p.html

          異常設(shè)計(jì)
          http://kb.csdn.net/java/Articles/200507/0c8d9bcb-deed-408c-9de6-977feeff1a6f.html

          Exception Handling: The good, the bad and the ugly (by Michael C. Daconta)
          http://techupdate.zdnet.com/techupdate/stories/main/0,14179,2686919,00.html

          異常處理優(yōu)劣觀
          http://www.gbg.cn/J2SE/17.html

          Exceptions in Java: Nothing Exceptional about them (by Gaurav Pal and Sonal Bansal)
          http://www.javaworld.com/javaworld/jw-08-2000/jw-0818-exceptions_p.html

          Using your own exception classes in Java (by Keld H. Hansen)
          http://javaboutique.internet.com/tutorials/Exceptions/

          Java異常處理之陋習(xí)展播
          http://www.jspcn.net/htmlnews/11049353245931571.html

          Using your own exception classes in Java (by Keld H. Hansen)
          http://javaboutique.internet.com/tutorials/Exceptions/

          異常處理--技術(shù)文章列表
          http://www.jspcn.net/htmlnews/B1106116974203.html

          posted on 2006-05-17 16:09 Xu Jianxiang 閱讀(519) 評(píng)論(0)  編輯  收藏 所屬分類: Java Tech
          主站蜘蛛池模板: 西乌珠穆沁旗| 沅陵县| 定陶县| 四会市| 怀宁县| 建瓯市| 梅河口市| 乐至县| 沛县| 吉林市| 原阳县| 英德市| 安塞县| 吴旗县| 比如县| 贵南县| 民丰县| 天祝| 宜宾市| 达日县| 韶山市| 闸北区| 太原市| 巧家县| 化州市| 巴彦淖尔市| 阳朔县| 锡林浩特市| 庆城县| 恩平市| 张家川| 洪湖市| 榆林市| 晋州市| 阳山县| 晴隆县| 汽车| 云霄县| 罗山县| 龙州县| 新野县|