Skip to content

Commit 8d0d643

Browse files
committed
update to v0.9.5
1 parent 336b570 commit 8d0d643

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/main/java/io/github/kubesys/client/KubernetesClient.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ public class KubernetesClient {
8383
*/
8484
public static final Logger m_logger = Logger.getLogger(KubernetesClient.class.getName());
8585

86+
/**
87+
* exceptions
88+
*/
89+
public static final String KUBE_CONNECTION_ERROR = "unable to connect to Kubernetes, ";
90+
8691
/**
8792
* it is used for sending requests to Kuberenetes kube-apiserver,
8893
* and then receiving response from it.
@@ -125,7 +130,7 @@ public KubernetesClient(File file, KubernetesAnalyzer analyzer) {
125130
this.requester = new BaseRequestConfig(new YAMLMapper().readTree(file));
126131
this.analyzer = analyzer.initIfNeed(this);
127132
} catch (Exception e) {
128-
m_logger.severe("unable to connect to Kubernetes, " + e);
133+
m_logger.severe(KUBE_CONNECTION_ERROR + e);
129134
System.exit(1);
130135
}
131136
}
@@ -168,7 +173,7 @@ public KubernetesClient(String url, String token, KubernetesAnalyzer analyzer) {
168173
this.requester = new BaseRequestConfig(url, token);
169174
this.analyzer = analyzer.initIfNeed(this);
170175
} catch (Exception e) {
171-
m_logger.severe("unable to connect to Kubernetes, " + e);
176+
m_logger.severe(KUBE_CONNECTION_ERROR + e);
172177
System.exit(1);
173178
}
174179
}
@@ -187,7 +192,7 @@ public KubernetesClient(String url, String username, String password, Kubernetes
187192
this.requester = new BaseRequestConfig(url, username, password);
188193
this.analyzer = analyzer.initIfNeed(this);
189194
} catch (Exception e) {
190-
m_logger.severe("unable to connect to Kubernetes, " + e);
195+
m_logger.severe(KUBE_CONNECTION_ERROR + e);
191196
System.exit(1);
192197
}
193198
}

0 commit comments

Comments
 (0)