mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-19 05:01:07 +00:00
version_cmp: give info about caller on error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
de64f10114
commit
cbfff937ae
@ -122,7 +122,11 @@ sub version_cmp {
|
||||
my $size = scalar(@versions);
|
||||
|
||||
return 0 if $size == 0;
|
||||
die "cannot compare odd count of versions" if $size & 1;
|
||||
|
||||
if ($size & 1) {
|
||||
my (undef, $fn, $line) = caller(0);
|
||||
die "cannot compare odd count of versions, called from $fn:$line\n";
|
||||
}
|
||||
|
||||
for (my $i = 0; $i < $size; $i += 2) {
|
||||
my ($a, $b) = splice(@versions, 0, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user