Java 应用与开发 - 异常处理
在 Java 语言中,程序运行出错被称为出现异常(Exception)。 异常是程序运行过程中发生的事件,该事件可以中断程序指令的 正常执行流程。 O Java 异常分为两大类 1. 错误(Error)是指 JVM 系统内部错误、资源耗尽等严重情 况。 2. 违例(Exception)则是指其他因编程错误或偶然的外在因 素导致的一般性问题,例如对负数开平方根、空指针访问、 试图读取不存在的文件以及网络连接中断等。 在 Java 语言中,程序运行出错被称为出现异常(Exception)。 异常是程序运行过程中发生的事件,该事件可以中断程序指令的 正常执行流程。 O Java 异常分为两大类 1. 错误(Error)是指 JVM 系统内部错误、资源耗尽等严重情 况。 2. 违例(Exception)则是指其他因编程错误或偶然的外在因 素导致的一般性问题,例如对负数开平方根、空指针访问、 试图读取不存在的文件以及网络连接中断等。 成一个相应的异常类对象,然后再将它交给运行时系统。 ▶ 运行时系统再寻找相应的代码来处理这一异常。如果 Java 运行时系统找不到可以处理异常的代码,则运行时系统将终 止,相应的 Java 程序也将退出。 ▶ 程序员通常对错误(Error)无能为力,因而一般只处理违 例 (Exception)。 大纲 异常的概念及分类 Java 异常处理机制 Java 异常处理机制 ▶ Java 程序执行过程中如出现异常,系统会监测到并自动生0 码力 | 33 页 | 626.40 KB | 1 年前3Java EE 企业应用系统开发 - HTTP 响应处理编程
0 码力 | 26 页 | 575.28 KB | 1 年前3Java EE 企业应用系统设计 - HTTP 请求处理编程
0 码力 | 27 页 | 565.27 KB | 1 年前3Spring Framework 1.2.x Changelog
JdkDynamicAopProxy's "Method.setAccessible" handling to avoid unnecessary calls * Cglib2AopProxy throws AopConfigException instead of AspectException, for better root cause handling * CGLIB proxies handle "hashCode" specific fashion as well Package org.springframework.jmx * MBeanExporter only logs a warning (no error) when an MBean does not exist anymore when trying to unregister * MBeanExporter's MBean autodetection Package org.springframework.validation * clarified that "Errors.reject" always registers a global error for the entire target object * "Errors.rejectValue" now accepts an empty field name to indicate the0 码力 | 94 页 | 267.57 KB | 1 年前3Spring Framework 2.5.6 Changelog
SQLErrorCodesFactory always loads its "sql-error-codes.xml" files from Spring's class loader (-> static singleton) * added "transientDataAccessResourceCodes" category to "sql-error-codes.xml", with default codes Sybase * SQLErrorCodeSQLExceptionTranslator applies default SQLExceptionSubclassTranslator after error code translation only * SQLErrorCodeSQLExceptionTranslator is able to work without fallback SQLState leading "/../" part as well (as accepted by most servlet containers) * DispatcherServlet removes error-view-driven servlet request attributes after rendering (for Tomcat compatibility) * exposed "getParamName()"0 码力 | 106 页 | 302.13 KB | 1 年前3Spring Framework 2.5.6 Changelog
SQLErrorCodesFactory always loads its "sql-error-codes.xml" files from Spring's class loader (-> static singleton) * added "transientDataAccessResourceCodes" category to "sql-error-codes.xml", with default codes Sybase * SQLErrorCodeSQLExceptionTranslator applies default SQLExceptionSubclassTranslator after error code translation only * SQLErrorCodeSQLExceptionTranslator is able to work without fallback SQLState leading "/../" part as well (as accepted by most servlet containers) * DispatcherServlet removes error-view-driven servlet request attributes after rendering (for Tomcat compatibility) * exposed "getParamName()"0 码力 | 106 页 | 305.07 KB | 1 年前3Spring Framework 1.2.8 Changelog
building correct relative paths for them Package org.springframework.jdbc * added further default SQL error codes for DB2 and HSQLDB * refined NativeJdbcExtractorAdapter to retry with DatabaseMetaData Connection method public * improved JdbcTemplate's logging of ignored SQLWarnings, including SQL state and error code in the log output * JdbcTemplate's "queryForObject"/"queryForInt"/etc methods correctly detect cannot" message at debug level (not warn) * TransactionInterceptor logs application exception at error level if commit throws an exception Package org.springframework.util * fixed CollectionsUtils's "hasUniqueObject"0 码力 | 89 页 | 254.65 KB | 1 年前3Spring Framework 2.5.5 Changelog
out MessageSourceSupport base class from AbstractMessageSource, providing common MessageFormat handling * DelegatingMessageSource resolves message arguments in default messages even if there is no parent CodebaseAwareObjectInputStream in RMI support * re-enabled PathMatchingResourcePatternResolver's JarURLConnection handling (accidentally disabled in 2.5.4) Package org.springframework.ejb * "jee:local/remote-slsb" accepts SqlXmlHandler abstraction (for the XML support in the Advanced Pack for Oracle Database) * added further SQL error code mapping for MS SQL Server Package org.springframework.jms * SingleConnectionFactory and Tra0 码力 | 101 页 | 291.00 KB | 1 年前3Spring Framework 1.2.7 Changelog
"messageSource" bean even through an alias Package org.springframework.jdbc * added further default SQL error codes for MS SQL, MySQL, and Oracle * OracleLobHandler lazily initializes Oracle driver classes, always LocalSessionFactoryBean offers protected "executeSchemaStatement" method for overriding the failure handling * added "configLocations" property to LocalSessionFactoryBean for Hibernate3, allowing to load NestedServletException wherever a root cause gets wrapped by a ServletException (for nicer root cause handling) * "contextConfigLocation" params in "web.xml" support "${...}" style placeholders for system properties0 码力 | 87 页 | 248.22 KB | 1 年前3Spring Framework 1.2.6 Changelog
to perform auto-detachment of the result * changed TopLink ServerSessionFactory's managed client handling to proxy-based, in base class AbstractSessionFactory * added support for TopLink SessionBroker springframework.validation * BindException uses canonical bean property paths for error registration, allowing any map key syntax for error access * added convenience constructors to DataBinder, WebDataBinder and ptor Package org.springframework.web * introduced NestedServletException for proper root cause handling, extended by Spring's MultipartException * refined ServletContextResourcePatternResolver to handle0 码力 | 83 页 | 236.45 KB | 1 年前3
共 393 条
- 1
- 2
- 3
- 4
- 5
- 6
- 40