Add error handling for suspension and termination errors when stopping container

feature/node-rewrite
Sven Slootweg 12 years ago
parent 242b2de271
commit b857e29b4d

@ -23,6 +23,16 @@ if($sContainer->sCurrentStatus != CVM_STATUS_STOPPED)
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_SUCCESS, $locale->strings['error-stop-success-title'], $locale->strings['error-stop-success-text']); $err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_SUCCESS, $locale->strings['error-stop-success-title'], $locale->strings['error-stop-success-text']);
$sError .= $err->Render(); $sError .= $err->Render();
} }
catch (ContainerSuspendedException $e)
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, $locale->strings['error-stop-suspended-title'], $locale->strings['error-stop-suspended-text']);
$sError .= $err->Render();
}
catch (ContainerTerminatedException $e)
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, $locale->strings['error-stop-terminated-title'], $locale->strings['error-stop-terminated-text']);
$sError .= $err->Render();
}
catch(ContainerStopException $e) catch(ContainerStopException $e)
{ {
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, $locale->strings['error-stop-failed-title'], $locale->strings['error-stop-failed-text']); $err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, $locale->strings['error-stop-failed-title'], $locale->strings['error-stop-failed-text']);

Loading…
Cancel
Save