// 测试new BigDecimal()毫秒值
// 常见异常要记住
public static void main(String[] args) {
// 此处会报错
BigDecimal bg = new BigDecimal("");
System.out.println(bg);
}
错误:
java.lang.NumberFormatException
at java.math.BigDecimal.<init>(BigDecimal.java:545)
at java.math.BigDecimal.<init>(BigDecimal.java:739)
at com.eotrust.platform.util.DecimalHelper.toDec(SourceFile:28)
at com.eotrust.scm.pub.service.PubService.genTransTaskOrderdtlData(PubService.java:8558)
at com.eotrust.scm.pub.service.PubService.genTransdtlByHeDan2(PubService.java:13821)
at com.eotrust.scm.pub.service.PubService.genTmsOrderMessageByHeDan2(PubService.java:13567)
at com.eotrust.scm.pub.service.PubService.doGenTmsOrderByHeDan2(PubService.java:12996)
at com.eotrust.scm.pub.service.PubService.genTmsOrderByHeDan2(PubService.java:12972)
at com.eotrust.scm.pub.service.PubService.autoGenTmsOrderDocWhenDispatch(PubService.java:14571)
at com.eotrust.scm.server.task.mqexecutor.service.MessageQueueExecuteService.executeTask(MessageQueueExecuteService