tailieunhanh - HandBooks Professional Java-C-Scrip-SQL part 112

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 112', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | If execution is in ordinary code or a handler the following sequence occurs 1. One stack frame is popped from the runtime call stack. 2. Control returns immediately to the routine that called the just-exited routine. This process repeats from the first bullet point until either control is inside a handler or the entire call stack is popped. The result is that a handler will handle exceptions raised directly in its preceding during block and may handle those generated indirectly through any level of routine calls if there are no handlers closer to the source of the exception. If there are no explicit handlers in the current call chain the uncaught exception handler will be called. Keywords for handling exceptions The Cocoa framework provides some definitions variables and functions to simplify exception creation propagation and handling NS_DURING Starts a try block a region of code that may generate exceptions. You don t have to test the result of each operation to see if an exception occurred if one does control will jump to the handling section. NS_HANDLER Starts an exception handling section that corresponds to the preceding try block. In this section the variable localException will exist and be set to the exception raised. NS_ENDHANDLER Ends the exception handling section. NS_VOIDRETURN Exits a method without returning a value. Use this macro when you need to exit a method from within a try block. Do not use the return keyword inside of a try block. NS_VALUERETURN value The same as NS_VOIDRETURN but used to return a value. If you leave the method using return the exception mechanism will lose track of the call stack. If later code raises an exception your program will probably crash. localException Defined in the handler with the value of the exception that was raised to get there. N SUncaughtExceptionHandler A C typedef for a function that takes an NSException and returns void. The return or parameter type for the following two functions .

TÀI LIỆU LIÊN QUAN
10    158    1
6    184    1
7    162    1
5    157    1
6    160    1
6    152    1
6    150    1
6    206    1
7    154    1