mirror of
https://git.proxmox.com/git/pve-common
synced 2025-08-15 19:14:59 +00:00
section config: use croak so that the error is from the callers POV
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
6b0c18d4db
commit
7db4e5d763
@ -3,6 +3,7 @@ package PVE::SectionConfig;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
|
use Carp;
|
||||||
use Digest::SHA;
|
use Digest::SHA;
|
||||||
|
|
||||||
use PVE::Exception qw(raise_param_exc);
|
use PVE::Exception qw(raise_param_exc);
|
||||||
@ -198,6 +199,8 @@ sub init {
|
|||||||
sub lookup {
|
sub lookup {
|
||||||
my ($class, $type) = @_;
|
my ($class, $type) = @_;
|
||||||
|
|
||||||
|
croak "cannot lookup undefined type!" if !defined($type);
|
||||||
|
|
||||||
my $pdata = $class->private();
|
my $pdata = $class->private();
|
||||||
my $plugin = $pdata->{plugins}->{$type};
|
my $plugin = $pdata->{plugins}->{$type};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user