Skip to content

Commit

Permalink
Fix the UnknownHostException is swallowed (#3495)
Browse files Browse the repository at this point in the history
  • Loading branch information
ljhrot authored Aug 2, 2020
1 parent 4310b3e commit b79f048
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class SnowFlowerIdGenerator implements IdGenerator {
try {
address = InetAddress.getLocalHost();
} catch (final UnknownHostException e) {
throw new IllegalStateException("Cannot get LocalHost InetAddress, please check your network!");
throw new IllegalStateException("Cannot get LocalHost InetAddress, please check your network!", e);
}
byte[] ipAddressByteArray = address.getAddress();
this.workerId = (((ipAddressByteArray[ipAddressByteArray.length - 2] & 0B11) << Byte.SIZE) + (
Expand Down

0 comments on commit b79f048

Please sign in to comment.