Package org.cyclop.model.exception

Examples of org.cyclop.model.exception.ServiceException


  public @NotNull String marshal(@NotNull Object obj) {
    byte[] marshalBytes;
    try {
      marshalBytes = objectMapper.get().writeValueAsBytes(obj);
    } catch (IOException e) {
      throw new ServiceException("Gout IOException during json marshalling: " + e.getMessage() + " - input:'"
          + obj + "'", e);
    }

    try {
      String marshal = new String(marshalBytes, "UTF-8");
      LOG.trace("Marshalled JSON from {} to {}", obj, marshal);
      return marshal;
    } catch (UnsupportedEncodingException e) {
      throw new ServiceException("UnsupportedEncodingException marshalling Json stream: " + e.getMessage()
          + " - input:'" + obj + "'", e);
    }

  }
View Full Code Here


  }

  @Override
  public void singleParamThrows(CqlTable table) throws Exception {
    if (table.partLc.equals("throw")) {
      throw new ServiceException("ex abc");
    }
  }
View Full Code Here

TOP

Related Classes of org.cyclop.model.exception.ServiceException

Copyright © 2018 www.massapicom. 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.