From 7a1fef78a26bfa913c4aaa5702b2d4178e663118 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 8 May 2025 09:26:53 +0200 Subject: [PATCH] global-functions: $GetMacVendor: :do ... on-error=... -> :onerror ... do=... --- global-functions.rsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/global-functions.rsc b/global-functions.rsc index 3b7ff7c..35dd0e0 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -586,12 +586,12 @@ ("https://api.macvendors.com/" . [ :pick $Mac 0 8 ]) output=user as-value ]->"data"); :return $Vendor; } on-error={ - :do { + :onerror Err { /tool/fetch check-certificate=yes-without-crl ("https://api.macvendors.com/") \ output=none as-value; $LogPrint debug $0 ("The mac vendor is not known in database."); - } on-error={ - $LogPrint warning $0 ("Failed getting mac vendor."); + } do={ + $LogPrint warning $0 ("Failed getting mac vendor: " . $Err); } :return "unknown vendor"; }