* [pve-devel] [PATCH pve-zsync] parse disks: improve error messages
@ 2023-09-12 9:31 Fiona Ebner
2023-09-12 12:18 ` Stefan Sterz
0 siblings, 1 reply; 3+ messages in thread
From: Fiona Ebner @ 2023-09-12 9:31 UTC (permalink / raw)
To: pve-devel
The one with the backup flag was reported in the community forum:
https://forum.proxmox.com/threads/77254/
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
pve-zsync | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pve-zsync b/pve-zsync
index 98190b2..0e48865 100755
--- a/pve-zsync
+++ b/pve-zsync
@@ -949,11 +949,12 @@ sub parse_disks {
$num++;
} else {
- die "ERROR: in path\n";
+ die "unexpected path '$path'\n";
}
}
- die "Vm include no disk on zfs.\n" if !$disks->{0};
+ die "guest does not include any ZFS volumes (or all excluded by the backup flag).\n"
+ if !$disks->{0};
return $disks;
}
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pve-devel] [PATCH pve-zsync] parse disks: improve error messages
2023-09-12 9:31 [pve-devel] [PATCH pve-zsync] parse disks: improve error messages Fiona Ebner
@ 2023-09-12 12:18 ` Stefan Sterz
2023-09-13 11:24 ` Thomas Lamprecht
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Sterz @ 2023-09-12 12:18 UTC (permalink / raw)
To: Proxmox VE development discussion
On Tue Sep 12, 2023 at 11:31 AM CEST, Fiona Ebner wrote:
> The one with the backup flag was reported in the community forum:
> https://forum.proxmox.com/threads/77254/
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
> pve-zsync | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/pve-zsync b/pve-zsync
> index 98190b2..0e48865 100755
> --- a/pve-zsync
> +++ b/pve-zsync
> @@ -949,11 +949,12 @@ sub parse_disks {
> $num++;
>
> } else {
> - die "ERROR: in path\n";
> + die "unexpected path '$path'\n";
> }
> }
>
> - die "Vm include no disk on zfs.\n" if !$disks->{0};
> + die "guest does not include any ZFS volumes (or all excluded by the backup flag).\n"
small nit: "guest" should be capitalized if this is the beginning of a
sentence. and imo "all are excluded" sounds more proper.
> + if !$disks->{0};
> return $disks;
> }
>
> --
> 2.39.2
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pve-devel] [PATCH pve-zsync] parse disks: improve error messages
2023-09-12 12:18 ` Stefan Sterz
@ 2023-09-13 11:24 ` Thomas Lamprecht
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2023-09-13 11:24 UTC (permalink / raw)
To: Proxmox VE development discussion, Stefan Sterz
Am 12/09/2023 um 14:18 schrieb Stefan Sterz:
> On Tue Sep 12, 2023 at 11:31 AM CEST, Fiona Ebner wrote:
>> The one with the backup flag was reported in the community forum:
>> https://forum.proxmox.com/threads/77254/
>>
>> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
>> ---
>> pve-zsync | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/pve-zsync b/pve-zsync
>> index 98190b2..0e48865 100755
>> --- a/pve-zsync
>> +++ b/pve-zsync
>> @@ -949,11 +949,12 @@ sub parse_disks {
>> $num++;
>>
>> } else {
>> - die "ERROR: in path\n";
>> + die "unexpected path '$path'\n";
>> }
>> }
>>
>> - die "Vm include no disk on zfs.\n" if !$disks->{0};
>> + die "guest does not include any ZFS volumes (or all excluded by the backup flag).\n"
> small nit: "guest" should be capitalized if this is the beginning of a
> sentence.
The more common variant in our code base is starting error messages
with lower case though, but I did not care to much to enforce it
most of the time where I got one starting with a capital letter.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-13 11:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12 9:31 [pve-devel] [PATCH pve-zsync] parse disks: improve error messages Fiona Ebner
2023-09-12 12:18 ` Stefan Sterz
2023-09-13 11:24 ` Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox