Package org.geoserver.platform

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


            }

        } catch (JSONException jsonException) {
            ServiceException serviceException = new ServiceException("Error: "
                    + jsonException.getMessage());
            serviceException.initCause(jsonException);
            throw serviceException;
        }

    }
View Full Code Here

            }

        } catch (JSONException jsonException) {
            ServiceException serviceException = new ServiceException("Error: "
                    + jsonException.getMessage());
            serviceException.initCause(jsonException);
            throw serviceException;
        }

    }
View Full Code Here

            outWriter.flush();

        } catch (JSONException jsonException) {
            ServiceException serviceException = new ServiceException("Error: "
                    + jsonException.getMessage());
            serviceException.initCause(jsonException);
            throw serviceException;
        }
    }

    private void writeCrs(final GeoJSONBuilder jsonWriter,
View Full Code Here

        iterator.close();
        iterator = null;

    } catch (Exception exception) {
        ServiceException serviceException = new ServiceException("Error: " + exception.getMessage());
        serviceException.initCause(exception);
        throw serviceException;
    } finally {
        if (iterator != null) {
            iterator.close();
            iterator = null;
View Full Code Here

      }
      iterator.close();
    } catch (Exception exception) {
      ServiceException serviceException = new ServiceException("Error: "
          + exception.getMessage());
      serviceException.initCause(exception);
      throw serviceException;
    }
  }

  public Kml getKml() {
View Full Code Here

                try {
                    filter = CQL.toFilter(constraint);
                } catch (Exception e) {
                    ServiceException se = new ServiceException("Invalid CQL expression: " + constraint,
                            ServiceException.INVALID_PARAMETER_VALUE, CONSTRAINT);
                    se.initCause(e);
                    throw se;
                }
                query.getConstraint().setCqlText(constraint);
                query.getConstraint().setFilter(filter);
            } else if (FILTER.equals(language)) {
View Full Code Here

                    query.getConstraint().setFilter(filter);
                    query.getConstraint().setVersion("1.1.0");
                } catch(Exception e) {
                    ServiceException se = new ServiceException("Invalid FILTER 1.1 expression: " + constraint,
                            ServiceException.INVALID_PARAMETER_VALUE, CONSTRAINT);
                    se.initCause(e);
                    throw se;
                }
            } else {
                throw new ServiceException("Invalid constraint language: " + language
                        + ", valid values are " + CQL_TEXT + " and " + FILTER,
View Full Code Here

      }
      iterator.close();
    } catch (Exception exception) {
      ServiceException serviceException = new ServiceException("Error: "
          + exception.getMessage());
      serviceException.initCause(exception);
      throw serviceException;
    }
  }

  private void setPolygonStyle(Feature feature) {
View Full Code Here

        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

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.