当前位置:
代码迷
>>
J2SE
>> 请问个有关问题,程序的错误,几乎全部用Exception捕捉,是否可行
详细解决方案
请问个有关问题,程序的错误,几乎全部用Exception捕捉,是否可行
热度:
33
发布时间:
2016-04-23 21:38:37.0
请教个问题,程序的异常,几乎全部用Exception捕捉,是否可行?
异常太多很难记,如果只使用Exception捕捉,行不行呢?Exception是所有异常的父类
分享到:
------解决方案--------------------
可以的~~~
------解决方案--------------------
但是看着不爽...
------解决方案--------------------
功能上没问题,但是如果遇到不同的异常,需要进行不同的处理时需要分开。
查看全文
相关解决方案
GWT 报错,能的请进: com.google.gwt.event.shared.UmbrellaException: Exception caught: Se
null id in com.bsw.gms.hibernate.pojo.Score entry (don't flush the Session after an exception occurs,该怎么解决
急问:S60,eclipse,打开模拟器总是提示“unhandled exception.Close application?该如何解决
捕获异常(尽量别直接捕获System.Exception)
为什么基于对话框的程序出现了first-Chance exception in NTDLL.dll解决思路
水晶报表-Exception of type 'System.OutOfMemoryException' was thrown.解决思路
水晶表格-Exception of type 'System.OutOfMemoryException' was thrown
水晶表格-Exception of type 'System.OutOfMemoryException' was thrown
throw new Exception("不得为空");如何换行
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'FreeTextBox' or one of its dependencies. 磁盘空间不足,该如何解决
asp.net给出异常的ORACLE exception
throw new Exception("Message.")什么意思?该如何处理
查询的结果集里包含有特殊字符会造成timeout exception?解决思路
如何获取最后一个 Exception
異常處理,catch(Exception ex)中的ex.Message怎樣在alert中調用到?解决思路
sql体现超长(This SQL offer threw the timeout exception)
exception specification list mismatch解决思路
关于First-chance exception in BREW_Simulator.exe (BREWAPP.DLL): 0xC0000005: Access Violation.的有关问题
关于MTK的错误(exception)分析
Processor ARM79_0 raised an exception.Cause: Undefined instruction,该如何处理
Servlet.service() for servlet jsp threw exception java.lang.NullPointerException,该如何解决
Servlet failed with Exception,java.lang.NullPointerException。求好手帮忙急
Hibernate的错误net.sf.hibernate.PropertyAccessException: exception settin
one hibernate SQL exception ?该如何处理
Orge编译通过,弹出异常ORGE EXCEPTION(6.)
[求助]unreporter exception java.text.ParseException;must be caught or ...
DONE新学JSP,在书上抄的第一个程序,type Exception!
exception in thread "main" java.lang.NoSuchMethodError:main
[求助]org/hibernate/exception/DataException
PHPExcel的exception 'Exception' with message 'The filename is not recognised as an OLE file有关问题解决