Examples of ConversionException


Examples of org.apache.wicket.util.convert.ConversionException

      {
        return Objects.convertValue(value, String.class);
      }
      catch (RuntimeException e)
      {
        throw new ConversionException("Could not convert object of type: " +
          value.getClass() + " to string. Possible its #toString() returned null. " +
          "Either install a custom converter (see IConverterLocator) or " +
          "override #toString() to return a non-null value.", e).setSourceValue(value)
          .setConverter(this);
      }
View Full Code Here

Examples of org.apache.wicket.util.convert.ConversionException

      {
        setMethod.setAccessible(true);
        Object converted = converter.convert(value, getMethod.getReturnType());
        if (converted == null && value != null)
        {
          throw new ConversionException("Can't convert value: " + value + " to class: " +
            getMethod.getReturnType() + " for setting it on " + object);
        }
        try
        {
          setMethod.invoke(object, index, converted);
View Full Code Here

Examples of org.apache.wicket.util.convert.ConversionException

        converted = converter.convert(value, type);
        if (converted == null)
        {
          if (value != null)
          {
            throw new ConversionException("Method [" + getMethod +
              "]. Can't convert value: " + value + " to class: " +
              getMethod.getReturnType() + " for setting it on " + object);
          }
          else if (getMethod.getReturnType().isPrimitive())
          {
            throw new ConversionException("Method [" + getMethod +
              "]. Can't convert null value to a primitive class: " +
              getMethod.getReturnType() + " for setting it on " + object);
          }
        }
      }
View Full Code Here

Examples of org.apache.wicket.util.convert.ConversionException

        {
          return theType.cast(converted);
        }
        else
        {
          throw new ConversionException("Could not convert value: " + value +
            " to type: " + theType.getName() + ". Could not find compatible converter.").setSourceValue(value);
        }
      }
      catch (Exception e)
      {
        throw new ConversionException(e.getMessage(), e).setSourceValue(value);
      }
    }
View Full Code Here

Examples of org.apache.wicket.util.convert.ConversionException

      {
        return (String)Objects.convertValue(value, String.class);
      }
      catch (Exception e)
      {
        throw new ConversionException("Could not convert object of type: " +
          value.getClass() + " to string. Possible its #toString() returned null. " +
          "Either install a custom converter (see IConverterLocator) or " +
          "override #toString() to return a non-null value.", e).setSourceValue(value)
          .setConverter(this);
      }
View Full Code Here

Examples of org.apache.wicket.util.convert.ConversionException

      {
        setMethod.setAccessible(true);
        Object converted = converter.convert(value, getMethod.getReturnType());
        if (converted == null && value != null)
        {
          throw new ConversionException("Can't convert value: " + value + " to class: " +
            getMethod.getReturnType() + " for setting it on " + object);
        }
        try
        {
          setMethod.invoke(object, index, converted);
View Full Code Here

Examples of org.apache.wicket.util.convert.ConversionException

        converted = converter.convert(value, type);
        if (converted == null)
        {
          if (value != null)
          {
            throw new ConversionException("Method [" + getMethod +
              "]. Can't convert value: " + value + " to class: " +
              getMethod.getReturnType() + " for setting it on " + object);
          }
          else if (getMethod.getReturnType().isPrimitive())
          {
            throw new ConversionException("Method [" + getMethod +
              "]. Can't convert null value to a primitive class: " +
              getMethod.getReturnType() + " for setting it on " + object);
          }
        }
      }
View Full Code Here

Examples of org.cishell.service.conversion.ConversionException

      String exceptionMessage =
        "The target format for conversion (\"" +
        targetFormat +
        "\") is not valid.";
     
      throw new ConversionException(exceptionMessage);
    }
  }
View Full Code Here

Examples of org.compass.core.converter.ConversionException

            String ret = sb.getStrings();
            return new StringReader(ret);
        } catch (ParserException e) {
            log.warn("Conversion Exception: " + e);
            throw new ConversionException(e.getMessage());
        } catch (IOException e2) {
            log.warn("Conversion Exception: " + e2);
            throw new ConversionException(e2.getMessage());
        }

    }
View Full Code Here

Examples of org.directwebremoting.ConversionException

            if (hasText(id)) {
                Assert.isEncrypted(decipherer, id);
                return new UUID(decipherer.decrypt(id));
            }
            } catch (Exception e) {
                throw new ConversionException(paramType, new IWebMvcException("Could not convert UUID from: " + data, e));
            }
      }
        return null;
    }
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.