mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-01-01 11:32:27 +08:00
log the whole exception if container could not be started
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
4a121ed613
commit
c61261a0a1
1 changed files with 6 additions and 2 deletions
|
@ -186,7 +186,11 @@ class DockerActionManager
|
||||||
|
|
||||||
public function StartContainer(Container $container) : void {
|
public function StartContainer(Container $container) : void {
|
||||||
$url = $this->BuildApiUrl(sprintf('containers/%s/start', urlencode($container->GetIdentifier())));
|
$url = $this->BuildApiUrl(sprintf('containers/%s/start', urlencode($container->GetIdentifier())));
|
||||||
$this->guzzleClient->post($url);
|
try {
|
||||||
|
$this->guzzleClient->post($url);
|
||||||
|
} catch (RequestException $e) {
|
||||||
|
throw new \Exception("Could not start container " . $container->GetIdentifier() . ": " . $e->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function CreateVolumes(Container $container): void
|
public function CreateVolumes(Container $container): void
|
||||||
|
@ -578,7 +582,7 @@ class DockerActionManager
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} catch (RequestException $e) {
|
} catch (RequestException $e) {
|
||||||
throw new \Exception("Could not start container " . $container->GetIdentifier() . ": " . $e->getMessage());
|
throw new \Exception("Could not create container " . $container->GetIdentifier() . ": " . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue