Examples of SetupException


Examples of org.apache.cocoon.pipeline.SetupException

        public InputStreamGenerator(InputStream inputStream) {
            super();

            if (inputStream == null) {
                throw new SetupException("An input stream has to be passed.");
            }

            this.inputStream = inputStream;
        }
View Full Code Here

Examples of org.apache.cocoon.pipeline.SetupException

        private final Node node;

        public NodeGenerator(Node document) {
            if (document == null) {
                throw new SetupException("A DOM document has to be passed.");
            }

            this.node = document;
        }
View Full Code Here

Examples of org.apache.cocoon.pipeline.SetupException

            DOMStreamer streamer = new DOMStreamer(XMLGenerator.this.getSAXConsumer());
            try {
                streamer.stream(this.node);
            } catch (SAXException e) {
                throw new SetupException("Can't stream DOM node + " + this.node);
            }
        }
View Full Code Here

Examples of org.apache.cocoon.pipeline.SetupException

        public SAXBufferGenerator(SAXBuffer saxBuffer) {
            super();

            if (saxBuffer == null) {
                throw new SetupException("A SAXBuffer has to be passed.");
            }

            this.saxBuffer = saxBuffer;
        }
View Full Code Here

Examples of org.apache.cocoon.pipeline.SetupException

        private String xmlString;

        public StringGenerator(String xmlString) {
            super();
            if (xmlString == null) {
                throw new SetupException("An XML string has to be passed.");
            }

            this.xmlString = xmlString;
        }
View Full Code Here

Examples of org.apache.cocoon.pipeline.SetupException

         *
         * @see org.apache.cocoon.pipeline.component.CachingPipelineComponent#constructCacheKey()
         */
        public CacheKey constructCacheKey() {
            if (this.source == null) {
                throw new SetupException(this.getClass().getSimpleName() + " has no source.");
            }

            URLConnection connection = null;
            try {
                connection = this.source.openConnection();
View Full Code Here

Examples of org.apache.cocoon.pipeline.SetupException

                append = Boolean.parseBoolean(String.valueOf(appendString));
            }
            try {
                this.logWriter = new FileWriter(logFile, append);
            } catch (IOException e) {
                throw new SetupException("Impossible to open log file '"
                        + logFile
                        + "' (append="
                        + append
                        + ")", e);
            }
View Full Code Here

Examples of org.apache.cocoon.pipeline.SetupException

            this.init(System.out);
        } else {
            try {
                this.init(new FileOutputStream(logFile));
            } catch (FileNotFoundException e) {
                throw new SetupException(
                        "Impossible to create an XML log file '"
                        + logFile
                        + "'", e);
            }
        }
View Full Code Here

Examples of org.apache.cocoon.pipeline.SetupException

            OutputStream os;
            try {
                os = new FileOutputStream(logFile);
                this.init(os);
            } catch (FileNotFoundException e) {
                throw new SetupException("Impossible to open XML log file '"
                        + logFile
                        + "'", e);
            }
        }
    }
View Full Code Here

Examples of org.apache.drill.exec.exception.SetupException

 
  public SchemaProvider getSchemaProvider(StorageEngineConfig engineConfig) throws SetupException{
    SchemaProvider engine = activeEngines.get(engineConfig);
    if(engine != null) return engine;
    Constructor<? extends SchemaProvider> c = allProviders.get(engineConfig.getClass());
    if(c == null) throw new SetupException(String.format("Failure finding StorageSchemaProvider constructor for config %s", engineConfig));
    try {
      return c.newInstance(engineConfig, config);
    } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
      Throwable t = e instanceof InvocationTargetException ? ((InvocationTargetException)e).getTargetException() : e;
      if(t instanceof SetupException) throw ((SetupException) t);
      throw new SetupException(String.format("Failure setting up new storage engine configuration for config %s", engineConfig), t);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.