Examples of initCause()


Examples of org.eclipse.jgit.errors.StoredObjectRepresentationNotAvailableException.initCause()

    try {
      readFully(src.offset, buf, 0, 20, ctx);
    } catch (IOException ioError) {
      StoredObjectRepresentationNotAvailableException gone;
      gone = new StoredObjectRepresentationNotAvailableException(src);
      gone.initCause(ioError);
      throw gone;
    }
    int c = buf[0] & 0xff;
    final int typeCode = (c >> 4) & 7;
    long inflatedLength = c & 15;
View Full Code Here

Examples of org.eclipse.jgit.errors.TransportException.initCause()

      final TransportException te;

      te = new TransportException(MessageFormat.format(JGitText.get().cannotGet, id.name()));
      if (failures != null && !failures.isEmpty()) {
        if (failures.size() == 1)
          te.initCause(failures.get(0));
        else
          te.initCause(new CompoundException(failures));
      }
      throw te;
    }
View Full Code Here

Examples of org.ejbca.core.model.ca.caadmin.extendedcaservices.ExtendedCAServiceRequestException.initCause()

        } catch( IllegalExtendedCAServiceRequestException e ) {
            throw e;
        } catch( Throwable e ) {
            this.providerHandler.reload();
            final ExtendedCAServiceRequestException e1 = new ExtendedCAServiceRequestException(hsmErrorString);
            e1.initCause(e);
            throw e1;
        } finally {
            this.keyContainer.releaseKey();
        }
    }
View Full Code Here

Examples of org.ejbca.core.model.ca.catoken.CATokenOfflineException.initCause()

            } else {
                throw new Error("Should never happen.");
            }
        } catch (IOException e) {
            final CATokenOfflineException e2 = new CATokenOfflineException("Not possible to create provider. See cause.");
            e2.initCause(e);
            throw e2;
        } finally {
            this.isSettingProvider = false;
            this.notifyAll();
        }
View Full Code Here

Examples of org.geoserver.platform.ServiceException.initCause()

        ioException.initCause(illegalArgument);
        ServiceException serviceException = new ServiceException("hello service exception");
        serviceException.setCode("helloCode");
        serviceException.setLocator("helloLocator");
        serviceException.getExceptionText().add("helloText");
        serviceException.initCause(ioException);
        handler.handleServiceException(serviceException, requestInfo);

        InputStream input = new ByteArrayInputStream(response.getOutputStreamContent().getBytes());

        DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
View Full Code Here

Examples of org.geoserver.wcs2_0.exception.WCS20Exception.initCause()

    protected void throwInvalidSyntaxException(Exception e) {
        WCS20Exception ex = new WCS20Exception(
                "Invalid ScaleAxes syntax, expecting a comma separate list of axisName(scale)*",
                WCS20Exception.WCS20ExceptionCode.InvalidEncodingSyntax, "scaleAxes");
        if(e != null) {
            ex.initCause(e);
        }
        throw ex;
       
    }
}
View Full Code Here

Examples of org.geoserver.wps.WPSException.initCause()

        RenderedImage ri = null;
        try {
            ri = decoder.decodeAsRenderedImage();
        } catch (IOException ioe){
            WPSException wpse = new WPSException("Unable to decode the image. Expected an image having mimetype = " + mimeType);
            wpse.initCause(ioe);
            throw wpse;
        }
        return ri;
    }
   
View Full Code Here

Examples of org.geotools.data.DataSourceException.initCause()

            } else {
                throw new DataSourceException("The specified path doesn't exist or can't be read: " + filePath);
            }
        } catch (IOException ioe) {
            DataSourceException dse = new DataSourceException("IOException occurred while accessing the specified path " + filePath);
            dse.initCause(ioe);
            throw dse;
       
        } finally {
            // Release resources. Close stream and dispose reader
            if (stream != null) {
View Full Code Here

Examples of org.geotools.util.UnsupportedImplementationException.initCause()

        try {
            wkt = (String) classe.getMethod("toWKT", (Class[])null).invoke(object, (Object[])null);
        } catch (Exception cause) {
            final UnsupportedImplementationException exception;
            exception = new UnsupportedImplementationException(classe);
            exception.initCause(cause);
            throw exception;
        }
        // TODO: Not yet implemented. We should insert the WKT in the formatter
        //       as pre-formatted text, and returns {@code null}.
        throw new UnsupportedImplementationException(classe);
View Full Code Here

Examples of org.glassfish.apf.AnnotationProcessorException.initCause()

                    processingResult =
                        HandlerProcessingResultImpl.getDefaultResult(
                        annotation.annotationType(), ResultType.FAILED);
                } catch(Throwable e){
                    AnnotationProcessorException ape = new AnnotationProcessorException(e.getMessage(), element);
                    ape.initCause(e);
                    throw ape;
                }
                result.addAll(processingResult);
            }
        } else {
View Full Code Here
TOP
Copyright © 2015 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.