Block creation of backups if it would put the server over it's limit

This commit is contained in:
Dane Everitt 2020-04-26 12:21:14 -07:00
parent f1c3762f4d
commit 446dc8b33d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,20 @@
<?php
namespace Pterodactyl\Exceptions\Service\Backup;
use Pterodactyl\Exceptions\DisplayException;
class TooManyBackupsException extends DisplayException
{
/**
* TooManyBackupsException constructor.
*
* @param int $backupLimit
*/
public function __construct(int $backupLimit)
{
parent::__construct(
sprintf('Cannot create a new backup, this server has reached its limit of %d backups.', $backupLimit)
);
}
}