下载此文档

学习党章笔记.doc


文档分类:高等教育 | 页数:约2页 举报非法文档有奖
1/2
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/2 下载此文档
文档列表 文档介绍
Exception Handling
1
Institute puter Software
Nanjing University
Outline
Introduction
Java Exceptions
Manchester University, Kung-Kiu Lau, CS3101
/~kung-kiu/cs3101/
Java Exception机制的不当使用示例
C++ Exceptions
/~ingber/SNL/CS162/PowerPoint/
Eiffel Exception Handling
Summary
2
Institute puter Software
Nanjing University
简介
问题
何谓“异常(Exception)”?
一种情况要异常到什么程度才算“异常”?
为什么要引入异常处理机制?
Robustness readability?
如何进行异常处理?
Mandatory or Optional
不同的认识,不同的答案
Java/C++/C#
Eiffel
3
Institute puter Software
Nanjing University
Java Exception Mechanisms
Java 对 Exception 的界定较宽
因而需认真区分不同类型的 Exceptions
Java的Exception机制回顾
try/catch/finally
自定义Exceptions
Java Exception与Design by Contract
Exception的转换
4
Institute puter Software
Nanjing University
Understanding Java Exceptions
这部分使用Manchester University, Kung-Kiu Lau, CS3101 的PPT Slides
/~kung-kiu/cs3101/
5
Institute puter Software
Nanjing University
What are Exceptions?
Many “exceptional” things can happen during the running of a program, .:
Bug in the actual language implementation
User mis-types input
Web page not available
File not found
Divide by zero
Array index out of bounds
Method called on a null object
Out of memory
Exceptions are unexpected conditions in programs.
checked
unchecked
sys errors
6
We can distinguish 3 categories:
checked exceptions — Problems to do with the program's in

学习党章笔记 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数2
  • 收藏数0 收藏
  • 顶次数0
  • 上传人zxwziyou8
  • 文件大小213 KB
  • 时间2018-06-23