1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-09-16 09:06:18 +02:00

Error when specified vm is invalid.

This commit is contained in:
David Steele
2019-10-17 14:00:18 +02:00
parent a52faf83a5
commit e06db21e35
2 changed files with 26 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ use Carp qw(confess);
use Exporter qw(import);
our @EXPORT = qw();
use pgBackRest::Common::Exception;
use pgBackRest::Common::Log;
use pgBackRest::DbVersion;
@@ -496,6 +497,21 @@ foreach my $strPgVersion (versionSupport())
}
}
####################################################################################################################################
# vmValid
####################################################################################################################################
sub vmValid
{
my $strVm = shift;
if (!defined($oyVm->{$strVm}))
{
confess &log(ERROR, "no definition for vm '${strVm}'", ERROR_OPTION_INVALID_VALUE);
}
}
push @EXPORT, qw(vmValid);
####################################################################################################################################
# vmGet
####################################################################################################################################