Skip to content

Commit a642a4a

Browse files
author
Jan Markmann
committed
Made Exceptions Errors.
1 parent 3cdde3c commit a642a4a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/KubernetesClient/Config.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,16 @@ public static function shutdown()
174174
* Create a config based off running inside a cluster
175175
*
176176
* @return Config
177+
* @throws \Error
177178
*/
178179
public static function InClusterConfig()
179180
{
180181
if (!file_exists('/var/run/secrets/kubernetes.io/serviceaccount/token')) {
181-
throw new \Exception('Config based off running inside a cluster not available. Token not found.');
182+
throw new \Error('Config based off running inside a cluster not available. Token not found.');
182183
}
183184

184185
if (!file_exists('/var/run/secrets/kubernetes.io/serviceaccount/ca.crt')) {
185-
throw new \Exception('Config based off running inside a cluster not available. CA not found.');
186+
throw new \Error('Config based off running inside a cluster not available. CA not found.');
186187
}
187188

188189
$config = new Config();

0 commit comments

Comments
 (0)