Examples of ConverterException


Examples of com.bansheeproject.exceptions.ConverterException

  @Override
  protected String encodeImpl(Object source) {
    try {
      if (source == null)
        throw new ConverterException("Parameter cannot be null");
       
       
      ReadNode readNode = Mapper.getReadClassMapper(source.getClass()).mapObject(source);
      if (readNode == null)
        throw new ConverterException("Could not read anything from IgnoredEntity. Perhaps it contains an @AccessType(IGNORE) ?");
      Map<String, String> values = readNode.getSimpleValues();
      XMLBuilder xmlBuilder = new XMLBuilder();
      for (String key : values.keySet()) {
        xmlBuilder.put(key, values.get(key));
      }
      return xmlBuilder.getAsString();
    }
    catch (Exception ex) {
      if (ex instanceof ConverterException)
        throw (ConverterException)ex;
      throw new ConverterException(ex);
    }
  }
View Full Code Here

Examples of com.documents4j.throwables.ConverterException

        try {
            return schedule().get();
        } catch (InterruptedException e) {
            // Note: In a future version, this call will be inlined into the calling thread.
            // Than this exception can become more specific.
            throw new ConverterException("Conversion was interrupted before it completed", e);
        } catch (ExecutionException e) {
            // All exceptions are caught and transformed into runtime exceptions.
            throw (RuntimeException) e.getCause();
        }
    }
View Full Code Here

Examples of com.liferay.util.ConverterException

      toText = StringUtil.replace(toText, "\n", " ");

      translation.setToText(toText);
    }
    catch (Exception e) {
      throw new ConverterException(e);
    }

    return translation;
  }
View Full Code Here

Examples of com.volantis.map.sti.converters.ConverterException

            marshallingContext.marshalDocument(request, null, null,
                    outputStream);

            marshallingContext.endDocument();
        } catch (JiBXException e) {
            throw new ConverterException(e);
        }

        // Parse the XML in byte array to W3C DOM Document
        ByteArrayInputStream inputStream = new ByteArrayInputStream(
                outputStream.toByteArray());
View Full Code Here

Examples of cookxml.core.exception.ConverterException

        parentWindow = ObjectConverter.getInstance ().convert (value, decodeEngine);
      }
      catch (Exception ex)
      {
        if (!(ex instanceof ConverterException))
          ex = new ConverterException (decodeEngine, ex, ObjectConverter.getInstance (), value);
        decodeEngine.handleException (null, ex);
      }
    }
    if (parentWindow == null)
      return new JDialog ();
View Full Code Here

Examples of de.ddb.conversion.ConverterException

            + "], [" + sourceFormatName + "|" + targetFormatName
            + "|null|null]");
      }
    }
    if (c == null) {
      throw new ConverterException(
          "No converter registered for conversions from '"
              + sourceFormatName + " (" + sourceEnc + ")' to '"
              + targetFormatName + " (" + targetEnc + ")'");
    }
    return c;
View Full Code Here

Examples of javax.faces.convert.ConverterException

            if (arg2 == null) return null;
            try {
                List<Role.AccessLevel> accessLevels = (List<Role.AccessLevel>)Component.getInstance("accessLevelsList");
                return accessLevels.get(accessLevels.indexOf(new Role.AccessLevel(Integer.valueOf(arg2), null)));
            } catch (NumberFormatException e) {
                throw new ConverterException("Cannot find selected access level", e);
            }
        }
View Full Code Here

Examples of javax.faces.convert.ConverterException

      FacesMessage message = new FacesMessage();
      message.setSummary(summary);
      message.setDetail(detail);
      message.setSeverity(FacesMessage.SEVERITY_ERROR);
      throw new ConverterException(message);
    }
  }
View Full Code Here

Examples of javax.faces.convert.ConverterException

      FacesMessage message = new FacesMessage();
      message.setSummary(summary);
      message.setDetail(detail);
      message.setSeverity(FacesMessage.SEVERITY_ERROR);
      throw new ConverterException(message);
      //return null;
    }
  }
View Full Code Here

Examples of javax.faces.convert.ConverterException

      FacesMessage message = new FacesMessage();
      message.setSummary(summary);
      message.setDetail(detail);
      message.setSeverity(FacesMessage.SEVERITY_ERROR);
      throw new ConverterException(message);
      // 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.