docs: public URLConnection getResourceConnection(String resourceName) throws ResourceException {
          // Get the URLConnection
          URLConnection groovyScriptConn = null;
  
          ResourceException se = null;
          for (URL root : roots) {
              URL scriptURL = null;
              try {
                  scriptURL = new URL(root, resourceName);
                  groovyScriptConn = openConnection(scriptURL);
  
                  break; // Now this is a bit unusual
              } catch (MalformedURLException e) {
                  String message = "Malformed URL: " + root + ", " + resourceName;
                  if (se == null) {
                      se = new ResourceException(message);
                  } else {
                      se = new ResourceException(message, se);
                  }
              } catch (IOException e1) {
                  String message = "Cannot open URL: " + root + resourceName;
                  groovyScriptConn = null;
                  if (se == null) {
                      se = new ResourceException(message);
                  } else {
                      se = new ResourceException(message, se);
                  }
              }
          }
  
          if (se == null) se = new ResourceException("No resource for " + resourceName + " was found");
  
          // If we didn't find anything, report on all the exceptions that occurred.
          if (groovyScriptConn == null) throw se;
          return groovyScriptConn;
      }