From 2456d6daa0d82ec1b744d727436b72fce8eb3775 Mon Sep 17 00:00:00 2001 From: nhyatt Date: Sun, 22 Oct 2023 11:32:26 -0500 Subject: [PATCH] corrects try/catch --- nordvpn-autoconfigure.jenkins | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nordvpn-autoconfigure.jenkins b/nordvpn-autoconfigure.jenkins index 343dd42..6e47602 100644 --- a/nordvpn-autoconfigure.jenkins +++ b/nordvpn-autoconfigure.jenkins @@ -110,11 +110,14 @@ pipeline { | base64 -w 0 """ ) - } catch(e) { + + // check for error if (openVPNConfig.length() == 0 || openVPNConfig == "") { - printf("Bad nordURL: %s", nordURL) - throw e + throw new Exception(nordURL) } + } catch(e) { + println(sprintf("Bad nordURL: %s", nordURL)) + throw e } }