1 public void func1() throws Exception1 { 2 // ... 3 } 4 5 6 public void func2() throws Exception2 { 7 //... 8 try { 9 func1(); 10 } catch(Exception1 e) { 11 throw new Exception2("...", e); // wrap成新的Exception2然后re-throw 12 } 13 //... 14 }
标签:...,func1,处理,void,Exception2,Exception1,异常,public From: https://www.cnblogs.com/woaiheniunai/p/16843004.html