Java的异常体系
文章目录
序
本文主要记录java的异常体系
概览
Exception

分checked exception以及unchecked exception(runtime exception)
-
checked exception
除runtime exception外的exception。ReflectiveOperationException(
ClassNotFoundException、 NoSuchFieldException、NoSuchMethodException)IOException(
FileNotFoundException、FileExistsException)IOException(
SocketException、SocketTimeoutException)SQLException
InterruptedException、TimeoutException
URIReferenceException、URISyntaxException
XMLSchemaException、XMLParseException、XMLStreamException
runtime exception
NullPointerException、NumberFormatException、ArrayIndexOutOfBoundsException、StringIndexOutOfBoundsException、ClassCastException、ArithmeticException、IllegalArgumentException
Error

Error表示致命错误,比如OutOfMemoryError,NoSuchMethodError

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论