Skip to content

Commit

Permalink
add exception catcher while parsing port or IP + bump version number
Browse files Browse the repository at this point in the history
  • Loading branch information
unixfox committed Dec 28, 2020
1 parent 1f2ad82 commit 5f557d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>de.craftmania</groupId>
<artifactId>DockerizedCraft</artifactId>
<version>0.2.5</version>
<version>0.2.6</version>

<distributionManagement>
<repository>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,16 @@ public void eventReceived(Action action, Pod resource) {
logger.info("[Kubernetes Container Inspector] port: " + port);
logger.info("[Kubernetes Container Inspector] ip: " + ip);
}
containerEvent.setPort(Integer.parseInt(port));
containerEvent.setIp(InetAddress.getByName(ip));
try {
containerEvent.setPort(Integer.parseInt(port));
containerEvent.setIp(InetAddress.getByName(ip));
}
catch(Exception ex) {
if (this.debug) {
logger.info("Error while parsing port or IP.");
}
return;
}
} else {
if (this.debug) {
logger.info("[Kubernetes Container Inspector] env:" + environmentVariables);
Expand Down

0 comments on commit 5f557d0

Please sign in to comment.