Exception
2015-11-13 10:13
155 查看
异常分为编译期异常(检查异常)和运行时异常
常见的编译异常:IOException ,SQLException, 安全异常,涉及到mail的AddressException,MessagingException
java.lang.InterruptedException
Thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity. Occasionally a method may wish to test whether the current thread has been interrupted, and if so, to immediately throw this exception. The following code can be used to achieve this effect:
if (Thread.interrupted()) // Clears interrupted status! throw new InterruptedException();
- Since:
- JDK1.0
- Version:
- %I%, %G%
- Author:
- Frank Yellin
- See Also:
- java.lang.Object.wait()
- java.lang.Object.wait(long)
- java.lang.Object.wait(long, int)
- java.lang.Thread.sleep(long)
- java.lang.Thread.interrupt()
- java.lang.Thread.interrupted()
常见的运行期异常:空指针异常 内存溢出 内存泄露 数学异常 数据转换异常 数组越界等
相关文章推荐
- Exception:According to TLD or attribute directive in tag file, attribute value does not accept any expression
- .net System.TypeInitializationException 类型初始值设定项引发异常
- Could not create the view: An unexpected exception was thrown.解决办法
- .Net 使用sos.dll调式OutOfMemoryException
- Android:使用ButterKnife注解绑定控件后报NullPointException
- Android应用程序启动时发生AndroidRuntime : ClassNotFoundException for Activity class的解决方法
- NoSuchBeanDefinitionException
- org.hibernate.TransientObjectException: The given object has a null identifier:
- 解决java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException
- Sys.WebForms.PageRequestManagerParserErrorException的解决方法
- java的异常(Exception)信息的详细记录
- java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
- ield 'ClassID' doesn't have a default value 2015-09-14 13:37:25,015 ERROR [org.apache.struts2.dispatcher.Dispatcher] - Exception occurred during processing request: could not execute statement org.hibernate.exception.GenericJDBCException: could not execut
- Java常见异常(Runtime Exception )小结
- com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException
- JavaI/O中使用readUTF()报java.io.EOFException暂时解决方案
- com.android.ddmlib.SyncException: Read-only file system
- Myeclipse:Could not create the view:An unexpected exception was thrown问题
- [原]在Oracle SOASUITE 10g 调用ESB 报“java.io.FileNotFoundException: /u01/esb/product/10.1.3.1/j2ee/home/../Context.properties”问题的解决办法
- faultString: org.xml.sax.SAXParseException: Premature end of file问题解决方案