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 } }