Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Ex01 extends Exception {
- }
- class Ex02 extends Exception {
- }
- class Test {
- void throwEx01() throws Ex01 {
- throw new Ex01();
- }
- void throwEx02() throws Ex02 {
- throw new Ex02();
- }
- void invoke() throws Ex02 {
- try {
- throwEx01();
- }
- catch (Ex01 e) {
- // Damushaveba...
- }
- throwEx02();
- }
- public static void main(String[] args) {
- try {
- new Test().invoke();
- }
- catch (Ex02 e) {
- // Damushaveba...
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment