BigDecimal 除 某个数 等于零 然后就报错了 那么 问题来了 有零这种情况 怎么办呢
BigDecimal num = BigDecimal.valueOf(Double.valueOf(m.get("num").toString()));
double completedDouble = Double.valueOf(m.get("completed").toString());
BigDecimal completed = num.divide(BigDecimal.valueOf(completedDouble),2, RoundingMode.CEILING);
ERROR c.i.e.handler.GlobalExceptionHandler - java.lang.ArithmeticException: / by zero
at java.math.BigDecimal.divideAndRound(BigDecimal.java:4137)
at java.math.BigDecimal.divide(BigDecimal.java:5214)
at java.math.BigDecimal.divide(BigDecimal.java:1564)
at java.math.BigDecimal.divide(BigDecimal.java:1594)