Examples of SourceException


Examples of org.apache.excalibur.source.SourceException

        try {
            source = resolver.resolveURI(sourceUri);
            dest = resolver.resolveURI(destUri);
           
            if(!(dest instanceof ModifiableSource))
                throw new SourceException("Destination '"+ dest.getURI() + "' is not modifiable.");
           
            copy(source, (ModifiableSource) dest, useBuffer);           
        }
        finally {
            if(source != null)
View Full Code Here

Examples of org.apache.excalibur.source.SourceException

        if (this.needsRefresh) {
            this.refresh();
        }
        // VG: Why exception is not thrown in constructor?
        if (this.exception != null) {
            throw new SourceException("Cannot get input stream for " + getURI(), this.exception);
        }

        if (this.redirectSource != null) {
            return this.redirectSource.getInputStream();
        }

        try {
            ByteArrayOutputStream os = new ByteArrayOutputStream();
            this.environment.setOutputStream(os);
            CocoonComponentManager.enterEnvironment(this.environment,
                                                    this.manager,
                                                    this.pipelineProcessor);
            try {
                this.processingPipeline.process(this.environment);
            } finally {
                CocoonComponentManager.leaveEnvironment();
            }
            return new ByteArrayInputStream(os.toByteArray());

        } catch (ResourceNotFoundException e) {
            throw new SourceNotFoundException("Exception during processing of " + this.systemId, e);
        } catch (Exception e) {
            throw new SourceException("Exception during processing of " + this.systemId, e);
        } finally {
            // Unhide wrapped environment output stream
            this.environment.setOutputStream(null);
            this.needsRefresh = true;
        }
View Full Code Here

Examples of org.apache.excalibur.source.SourceException

        Source src = null;
        Stack ancestors = null;
        try {
            src = this.resolver.resolveURI(this.source);
            if (!(src instanceof TraversableSource)) {
                throw new SourceException(this.source + " is not a traversable source");
            }
            final TraversableSource inputSource =
                (TraversableSource) this.resolver.resolveURI(this.source);

            if (!inputSource.exists()) {
View Full Code Here

Examples of org.apache.torque.generator.source.SourceException

        {
            properties.load(inputStream);
        }
        catch (IOException e)
        {
            throw new SourceException(
                    "Error parsing Properties source file: " + e.getMessage(),
                    e);
        }
        catch (IllegalArgumentException e)
        {
            throw new SourceException(
                    "Error parsing Properties source file: " + e.getMessage(),
                    e);
        }

        SourceElement result
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.