Examples of ProcessException


Examples of org.apache.slide.projector.ProcessException

      } else if ( node instanceof CDATA ) {
        return new StringValue(((CDATA)node).toString());
      } else if ( node instanceof ProcessingInstruction ) {
        return new StringValue(((ProcessingInstruction)node).getData());
        }
        throw new ProcessException(new ErrorMessage("unconvertableJDomNode"));
    }
View Full Code Here

Examples of org.chromium.sdk.internal.wip.WipRelayRunner.ProcessException

        }

        @Override
        public Step<ResultOrException> processResponse(CallFunctionOnData response)
            throws ProcessException {
          throw new ProcessException("Helper script failed on remote: " +
              response.result().value());
        }

        @Override
        public Exception processFailure(Exception cause) {
View Full Code Here

Examples of org.chromium.sdk.internal.wip.WipRelayRunner.ProcessException

        }

        @Override
        public Step<ResultOrException> processResponse(CallFunctionOnData response)
            throws ProcessException {
          throw new ProcessException("Helper script failed on remote: " +
              response.result().value());
        }

        @Override
        public Exception processFailure(Exception cause) {
View Full Code Here

Examples of org.chromium.sdk.internal.wip.WipRelayRunner.ProcessException

        }

        @Override
        public Step<JsVariable> processResponse(CallFunctionOnData response)
            throws ProcessException {
          throw new ProcessException("Helper script failed on remote: " +
              response.result().value());
        }

        @Override
        public Exception processFailure(Exception cause) {
View Full Code Here

Examples of org.chromium.sdk.internal.wip.WipRelayRunner.ProcessException

        }

        @Override
        public Step<JsVariable> processResponse(CallFunctionOnData response)
            throws ProcessException {
          throw new ProcessException("Helper script failed on remote: " +
              response.result().value());
        }

        @Override
        public Exception processFailure(Exception cause) {
View Full Code Here

Examples of org.geotools.process.ProcessException

      // transform the geometry to raster space so that we can use it as a ROI source
      Geometry rasterSpaceGeometry;
    try {
      rasterSpaceGeometry = JTS.transform(roi, new AffineTransform2D(mt2d.createInverse()));
    } catch (MismatchedDimensionException e) {
      throw new ProcessException(e);
    } catch (TransformException e) {
      throw new ProcessException(e);
    } catch (NoninvertibleTransformException e) {
      throw new ProcessException(e);
    }
      // System.out.println(rasterSpaceGeometry);
      // System.out.println(rasterSpaceGeometry.getEnvelopeInternal());
     
      // simplify the geometry so that it's as precise as the coverage, excess coordinates
View Full Code Here

Examples of org.geotools.process.ProcessException

        try {
            return JTS.transform(geometry, CRS.findMathTransform(sourceCRS, targetCRS, true));
        }
        catch (Exception e) {
            throw new ProcessException("Reprojection faiiled", e);
        }
    }
View Full Code Here

Examples of org.geotools.process.ProcessException

    }

    public static void checkCompatibleCoverages(GridCoverage2D coverageA, GridCoverage2D coverageB) throws ProcessException {
        if (coverageA == null || coverageB == null){
            String coveragesNull = coverageA == null ? (coverageB == null ? "coverageA and coverageB" : "coverageA") : "coverageB"
            throw new ProcessException(Errors.format(ErrorKeys.NULL_ARGUMENT_$1, coveragesNull));
        }
       
        //
        // checking same CRS
        //
        CoordinateReferenceSystem crsA = coverageA.getCoordinateReferenceSystem();
        CoordinateReferenceSystem crsB = coverageB.getCoordinateReferenceSystem();
        if (!CRS.equalsIgnoreMetadata(crsA, crsB)){
            MathTransform mathTransform = null;
            try {
                mathTransform = CRS.findMathTransform(crsA, crsB);
            } catch (FactoryException e) {
                throw new ProcessException("Exceptions occurred while looking for a mathTransform between the 2 coverage's CRSs", e );
            }
            if (mathTransform != null && !mathTransform.isIdentity()){
                throw new ProcessException(MISMATCHING_CRS_MESSAGE);
            }
        }
       
        //
        // checking same Envelope and grid range
        //
        Envelope envA = coverageA.getEnvelope();
        Envelope envB = coverageB.getEnvelope();
        if (!envA.equals(envB)) {
            throw new ProcessException(MISMATCHING_ENVELOPE_MESSAGE);
        }
       
        GridEnvelope gridRangeA = coverageA.getGridGeometry().getGridRange();
        GridEnvelope gridRangeB = coverageA.getGridGeometry().getGridRange();
        if (gridRangeA.getSpan(0) != gridRangeB.getSpan(0)
                || gridRangeA.getSpan(1) != gridRangeB.getSpan(1)) {
            throw new ProcessException(MISMATCHING_GRID_MESSAGE);
        }
    }
View Full Code Here

Examples of org.geotools.process.ProcessException

     * @param coverages
     * @throws ProcessException
     */
    public static void checkCompatibleCoveragesForMerge(Collection<GridCoverage2D> coverages) throws ProcessException {
        if (coverages == null || coverages.isEmpty()){
            throw new ProcessException(Errors.format(ErrorKeys.NULL_ARGUMENT_$1, "Input coverage List"));
        }
       
        //
        // checking same CRS
        //
View Full Code Here

Examples of org.geotools.process.ProcessException

        if (!CRS.equalsIgnoreMetadata(crsA, crsB)){
            MathTransform mathTransform = null;
            try {
                mathTransform = CRS.findMathTransform(crsA, crsB);
            } catch (FactoryException e) {
                throw new ProcessException("Exceptions occurred while looking for a mathTransform between the coverage's CRSs", e );
            }
            // Check if their transformation is an identity
            if (mathTransform != null && !mathTransform.isIdentity()){
                throw new ProcessException(MISMATCHING_CRS_MESSAGE);
            }
        }
    }
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.