67,513
社区成员
发帖
与我相关
我的任务
分享
StatckTraceElement[] es=e.getStatckTrace();
public class ServiceException extends Exception{
private static final long serialVersionUID = 1L;
public ServiceException(){
}
public ServiceException(String msg){
super(msg);
}
public ServiceException(String msg, Throwable ex){
super(msg, ex);
}
public ServiceException(Throwable ex){
super(ex);
}
}
Object obj = null;
try{
obj.equals("aa");
}catch(Exception ex){
// ex.printStackTrace();
throw new Exception("我定义的信息====="+ex.getMessage().toString());
}
catch(Exception e){
throw new Exception("xxxx"+e.getMessage);
}
throw new Exception("",e);