Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
15 lines (13 loc) · 457 Bytes

File metadata and controls

15 lines (13 loc) · 457 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package ExceptionTes;
public class throwTes {
public void A() throws Exception { // 被调用函数 如果不对异常进行处理,则向调用者函数抛出
throw new Exception("s");
}
public void B() {
//如果被调用函数不处理异常,则调用函数必须处理异常,如果处理不了继续抛出,让上一级函数继续处理
try{
A();
}catch (Exception e){
}
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.