你在用try、catch捕获到错误后抛出自己定义的错误类型,里面可以放用户能看懂的信息。比如:
try{
    操作代码
}catch (Exception e){
    throw new Exception("操作错误,原因:" + e.getMessage());
}