mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 06:13:45 +02:00
Block creation of backups if it would put the server over it's limit
This commit is contained in:
20
app/Exceptions/Service/Backup/TooManyBackupsException.php
Normal file
20
app/Exceptions/Service/Backup/TooManyBackupsException.php
Normal 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)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user