java中捕获Oracle异常

try{

} catch (Exception e){
 String msg=.getMessage():
 int index= msg. toUpperCase(). indexOf("ORA-");
 String msg1= null;
 if(index !=-1){
 msg1= msg. substring(index 4, index +9);
}
 cfContractInfoModel. setMsg(msg1);
 return cfContractInfoModel;
}

  

 
原文地址:https://www.cnblogs.com/jiao-/p/10790594.html