Examples of ConversionException


Examples of retrofit.converter.ConversionException

   
    try {
      return objectMapper.readValue(body.in(), javaType);
    }
    catch (IOException e) {
      throw new ConversionException(e);
    }
  }
View Full Code Here

Examples of wicket.util.convert.ConversionException

            if (urlString.equals("")) {
              return null;
            } else {
              url = Transformer.url(urlString);
              if (url == null) {
                throw new ConversionException(
                    "Not a valid URL: " + source);
              }
            }
          } else {
            throw new ConversionException("Not a valid URL: "
                + source);
          }
        } else if (targetClass == String.class) {
          // from URL to String
          if (source instanceof String) {
            return source;
          } else if (source instanceof URL) {
            URL convertedUrl = (URL) source;
            String urlString = Transformer.string(convertedUrl);
            return urlString;
          } else {
            throw new ConversionException("Not a valid URL: "
                + source);
          }
        } else {
          throw new ConversionException("Not a valid URL: " + source);
        }
      }
    } catch (Exception e) {
      log.error("Error in UrlConverter: " + targetClass.getName() + " - "
          + e.getMessage());
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.