Display error message when user attempts to start or restart a suspended container

feature/node-rewrite
Sven Slootweg 13 years ago
parent aee9034fee
commit ff4e28e626

@ -30,6 +30,11 @@ try
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_SUCCESS, "Container restarted", "Your container was successfully restarted.");
$sError .= $err->Render();
}
catch (ContainerSuspendedException $e)
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, "Container is suspended", "Your container could not be restarted, as it is currently suspended. If you believe this is in error, please file a support ticket.");
$sError .= $err->Render();
}
catch(ContainerStartException $e)
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, "Container failed to start", "Your container could not be started. If this error persists, please file a support ticket.");

@ -23,7 +23,12 @@ if($sContainer->sCurrentStatus != CVM_STATUS_STARTED)
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_SUCCESS, "Container started", "Your container was successfully started.");
$sError .= $err->Render();
}
catch(ContainerStartException $e)
catch (ContainerSuspendedException $e)
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, "Container is suspended", "Your container could not be started, as it is currently suspended. If you believe this is in error, please file a support ticket.");
$sError .= $err->Render();
}
catch (ContainerStartException $e)
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, "Container failed to start", "Your container could not be started. If this error persists, please file a support ticket.");
$sError .= $err->Render();

Loading…
Cancel
Save