Package com.betfair.cougar.codegen.except

Examples of com.betfair.cougar.codegen.except.PluginException


    public void validate(Document doc) {
      try {
        doValidate(doc);
      }
        catch (Exception e) {
            throw new PluginException("Error validating document: " + e, e);
        }     
    }
View Full Code Here


        try {
            DocumentBuilder parser = createParser(resolver);
            return parser.parse(is);
        }
        catch (Exception e) {
            throw new PluginException("Error parsing XML document from input stream: " + e, e);
        }
    }
View Full Code Here

        try {
            DocumentBuilder parser = createParser(resolver);
            return parser.parse(xmlFile);
        }
        catch (Exception e) {
            throw new PluginException("Error parsing XML document '" + xmlFile + "': " + e, e);
        }
    }
View Full Code Here

  public ResourceLoader(List<String> classpath) {
    if (classpath != null) {
      try {
        runtimeClassLoader = urlClassLoader(classpath);
      } catch (MalformedURLException e) {
        throw new PluginException("Error initialising resource loader: " + e, e);
      }
    }
    else {
      runtimeClassLoader = null;
    }
View Full Code Here

   */
  public InterceptingResolver(Log log, ResourceLoader resourceLoader, String[] catalogs) {
    super(catalogs);
    for (String f : catalogs) {
      if (!new File(f).exists()) {
        throw new PluginException("Given nonexistent catalog: " + f);
      }
    }
    this.log = log;
    this.resourceLoader = resourceLoader;
  }
View Full Code Here

        return super.resolveEntity(publicId, systemId);       
      }
    }
    catch (Exception e) {
      // not in spec but too bad
      throw new PluginException("Error resolving entity: " + systemId + ": " + e, e);
    }
  }
View Full Code Here

                return super.resolveResource(type, namespaceURI, publicId, systemId, baseURI);
      }
    }
    catch (Exception e) {
      // this is cheating, the spec says allow for an exception, but we don't care
      throw new PluginException("Error resolving resource: " + systemId + ": " + e, e);
    }   
  }
View Full Code Here

    String packageName = service.getPackageName();
    if (packageName == null) {
      packageName = readNamespaceAttr(iddDoc);
      if (packageName == null) {
        throw new PluginException("Cannot find a package name "
                + "(not specified in plugin and no namespace in IDD");
      }
    }
    return packageName;
  }
View Full Code Here

    XPathFactory xfactory = XPathFactory.newInstance();
    XPath xpath = xfactory.newXPath();
    try {
      return xpath.compile("/interface/@namespace");
    } catch (XPathExpressionException e) {
      throw new PluginException("Error compiling namespace XPath expression: " + e, e);
    }
    }
View Full Code Here

    String s;
    try {
      s = namespaceExpr.evaluate(doc);
    } catch (XPathExpressionException e) {
      throw new PluginException("Error evaluating namespace XPath expression: " + e, e);
    }
    // xpath returns an empty string if not found, null is cleaner for callers
    return (s == null || s.length() == 0) ? null : s;
    }
View Full Code Here

TOP

Related Classes of com.betfair.cougar.codegen.except.PluginException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.