tailieunhanh - Chapter 10 Exceptions

Exception or exceptions may refer to: An action that is not part of ordinary operations or standards Exception handling, in programming languages or a programming interrupt itself of which exception handling is meant to deal with. Exception (song), the second single from Ana Johnsson's second album Little Angel | Chapter 10 Exceptions © 2004 Pearson Addison-Wesley. All rights reserved 10- Exceptions Exception handling is an important aspect of object-oriented design Chapter 10 focuses on: the purpose of exceptions exception messages the try-catch statement propagating exceptions the exception class hierarchy © 2004 Pearson Addison-Wesley. All rights reserved 10- Outline Exception Handling The try-catch Statement Exception Classes I/O Exceptions © 2004 Pearson Addison-Wesley. All rights reserved 10- Exceptions An exception is an object that describes an unusual or erroneous situation Exceptions are thrown by a program, and may be caught and handled by another part of the program A program can be separated into a normal execution flow and an exception execution flow An error is also represented as an object in Java, but usually represents a unrecoverable situation and should not be caught © 2004 Pearson Addison-Wesley. All rights reserved 10- Exception Handling Java has a . | Chapter 10 Exceptions © 2004 Pearson Addison-Wesley. All rights reserved 10- Exceptions Exception handling is an important aspect of object-oriented design Chapter 10 focuses on: the purpose of exceptions exception messages the try-catch statement propagating exceptions the exception class hierarchy © 2004 Pearson Addison-Wesley. All rights reserved 10- Outline Exception Handling The try-catch Statement Exception Classes I/O Exceptions © 2004 Pearson Addison-Wesley. All rights reserved 10- Exceptions An exception is an object that describes an unusual or erroneous situation Exceptions are thrown by a program, and may be caught and handled by another part of the program A program can be separated into a normal execution flow and an exception execution flow An error is also represented as an object in Java, but usually represents a unrecoverable situation and should not be caught © 2004 Pearson Addison-Wesley. All rights reserved 10- Exception Handling Java has a predefined set of exceptions and errors that can occur during execution A program can deal with an exception in one of three ways: ignore it handle it where it occurs handle it an another place in the program The manner in which an exception is processed is an important design consideration © 2004 Pearson Addison-Wesley. All rights reserved 10- Exception Handling If an exception is ignored by the program, the program will terminate abnormally and produce an appropriate message The message includes a call stack trace that: indicates the line on which the exception occurred shows the method call trail that lead to the attempted execution of the offending line See (page 533) © 2004 Pearson Addison-Wesley. All rights reserved 10- Outline Exception Handling The try-catch Statement Exception Classes I/O Exceptions © 2004 Pearson Addison-Wesley. All rights reserved 10- The try Statement To handle an exception in a program, the line that throws the exception is executed within a

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.