Java 应用与开发 - 异常处理
异常处理机制 什么是异常 在 Java 语言中,程序运行出错被称为出现异常(Exception)。 异常是程序运行过程中发生的事件,该事件可以中断程序指令的 正常执行流程。 O Java 异常分为两大类 1. 错误(Error)是指 JVM 系统内部错误、资源耗尽等严重情 况。 2. 违例(Exception)则是指其他因编程错误或偶然的外在因 素导致的一般性问题,例如对负数开平方根、空指针访问、 问、 试图读取不存在的文件以及网络连接中断等。 小示例 课程配套代码 ± sample.exception.FirstExceptionSample.java 大纲 异常的概念及分类 Java 异常处理机制 什么是异常 在 Java 语言中,程序运行出错被称为出现异常(Exception)。 异常是程序运行过程中发生的事件,该事件可以中断程序指令的 正常执行流程。 O Java 异常分为两大类 1. 错误(Error)是指 JVM 系统内部错误、资源耗尽等严重情 况。 2. 违例(Exception)则是指其他因编程错误或偶然的外在因 素导致的一般性问题,例如对负数开平方根、空指针访问、 试图读取不存在的文件以及网络连接中断等。 小示例 课程配套代码 ± sample.exception.FirstExceptionSample.java 大纲 异常的概念及分类 Java 异常处理机制0 码力 | 33 页 | 626.40 KB | 1 年前3Back to Basics: Exceptions
iglberger@gmx.deContent 3 The Exception Situation How Do Exceptions Work Best Practices of Exception Handling When to Use Exceptions (And When Not) How to Use Exceptions The Exception Safety Guarantees How How to Write Exception-Safe Code How to Refactor Non-Exception-Safe CodeContent 4 The Exception Situation How Do Exceptions Work Best Practices of Exception Handling When to Use Exceptions (And When When Not) How to Use Exceptions The Exception Safety Guarantees How to Write Exception-Safe Code How to Refactor Non-Exception-Safe CodeWhy Another Talk on Exception Safety? 56 https://wg21.link/p070970 码力 | 111 页 | 4.87 MB | 5 月前3Exceptional C++
exceptions are a powerful mechanism of maneuvering execution on the unhappy path. Even if std::exception and related machinery are not your cup of tea, you might care about hardware faults or OS signals happens when an exception occurs, both at the application level and the OS level. We’ll explore the unwind process, the compiler generated code, the CRT hooks available and other exception internals. As Victor Ciura | @ciura_victor - Exceptional C++ 9 Exceptions vs Error codes vs ExpectedException safe code Error handling best practices Exceptional C++ This talk is not about:2021 Victor 0 码力 | 113 页 | 24.39 MB | 5 月前3Exceptionally Bad: The Story on the Misuse of Exceptions and How to Do Better
we be going ? • Talk will be about Exceptions as seen in C++ • Look at original goals/ideals of exception handling • Look at the mechanics of throw/catch • Look at Exceptions in both their use and design design of an Exception class Warning May be controversialThings to note about Exceptions in C++ • There is no exception class attribute/keyword • No formal definition of what an Exception is • What characteristics characteristics denotes an Exception Ergo, Usage is the primary characteristic of Exceptions 9 Bloomberg ForewordWhat were Exceptions meant to give us ? 10 Bloomberg Exceptional IdealsWhat do Exceptions0 码力 | 85 页 | 2.32 MB | 5 月前3C++ Exceptions for Smaller Firmware
Memory/Heap Increases Binary Size Requires whole C++ STL Run Time Type Info (RTTI) Exception Tables Exception Code Nondeterministic Slow Binary Search Frame Unwinding Type Comparison (dynamic_cast) Memory/Heap Increases Binary Size Requires whole C++ STL Run Time Type Info (RTTI) Exception Tables Exception Code Nondeterministic Slow Binary Search Frame Unwinding Type Comparison (dynamic_cast) {r3, lr} 800e: 2004 movs r0, #4 8010: f000 f93c bl 828c <__cxa_allocate_exception> 8014: 2305 movs r3, #5 8016: 4902 ldr r1, [pc, #8] 8018:0 码力 | 237 页 | 6.74 MB | 5 月前3Reference guide for FCL units. Document version 3.2.2
(??) method. The stream cannot be written to, trying to write to the stream will result in an exception. 1.4.2 Method overview Page Method Description 91 Close Close decoder 91 ClosedP Check if the whether all input data was consumed. Errors: If the input stream was invalid, an EConvertError exception is raised. See also: TASCII85DecoderStream.ClosedP (91), TASCII85DecoderStream.Read (92), TASCII85DecoderStream the TASCII85DecoderStream instance from memory. Errors: In case the input stream was invalid, an exception may occur. See also: TASCII85DecoderStream.Close (91) 91 CHAPTER 1. REFERENCE FOR UNIT ’ASCII85’0 码力 | 953 页 | 2.21 MB | 1 年前3Firebird 2.5 Language Reference
5.12. EXCEPTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 5.12.1. CREATE EXCEPTION . . . 12.2. ALTER EXCEPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 5.12.3. CREATE OR ALTER EXCEPTION . . . . . . 5.12.4. DROP EXCEPTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 5.12.5. RECREATE EXCEPTION . . . . . . .0 码力 | 521 页 | 2.30 MB | 1 年前3firebird 40 language reference
5.15. EXCEPTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 5.15.1. CREATE EXCEPTION . . . 15.2. ALTER EXCEPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 5.15.3. CREATE OR ALTER EXCEPTION . . . . . . 5.15.4. DROP EXCEPTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 5.15.5. RECREATE EXCEPTION . . . . . . .0 码力 | 778 页 | 3.43 MB | 1 年前3firebird language reference 30 rus
................. 226 EXCEPTION ........................................................................................................................... 226 CREATE EXCEPTION ...................... ................................................................................... 227 ALTER EXCEPTION ............................................................................................... ......................................................................... 228 CREATE OR ALTER EXCEPTION ............................................................................... 228 Примеры ..0 码力 | 719 页 | 3.98 MB | 1 年前3Tornado 6.0 Documentation
asynchronous). Asynchronous operations in Tornado generally return placeholder objects (Futures), with the exception of some low-level components like the IOLoop that use callbacks. Futures are usually transformed await c() # "return" and "yield" # cannot be mixed in # Python 2, so raise a # special exception. # Return normally raise gen.Return(b) return b Other differences between expression. How to call a coroutine Coroutines do not raise exceptions in the normal way: any exception they raise will be trapped in the awaitable object until it is yielded. This means it is important0 码力 | 869 页 | 692.83 KB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100