release- 调整异常处理业务逻辑

release-2024-08-08
pikaqiudeshujia 7 months ago
parent 2a782b307b
commit 92d433c132

@ -80,7 +80,7 @@ public class IdWorker {
public synchronized long nextId() {
long timestamp = timeGen();
if (timestamp < lastTimestamp) {
throw new BizException(String.format("Clock moved backwards. Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
throw new RuntimeException(String.format("Clock moved backwards. Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
}
if (lastTimestamp == timestamp) {

Loading…
Cancel
Save