Search in sources :

Example 21 with ConversionException

use of com.thoughtworks.xstream.converters.ConversionException in project ddf by codice.

the class TransactionRequestConverter method getRecordPropertyValue.

private Serializable getRecordPropertyValue(HierarchicalStreamReader reader, String cswField) {
    try {
        Serializable newValue;
        if (reader.hasMoreChildren()) {
            reader.moveDown();
            newValue = readPropertyValue(reader, cswField);
            reader.moveUp();
        } else {
            newValue = readPropertyValue(reader, cswField);
        }
        return newValue;
    } catch (NumberFormatException e) {
        throw new ConversionException("Invalid Parameter Value: a RecordProperty " + "specified a Value that does not match the type " + cswField + " expected by  for the field " + cswField, e);
    }
}
Also used : ConversionException(com.thoughtworks.xstream.converters.ConversionException) Serializable(java.io.Serializable)

Aggregations

ConversionException (com.thoughtworks.xstream.converters.ConversionException)21 IOException (java.io.IOException)5 InputStreamReader (java.io.InputStreamReader)4 Method (java.lang.reflect.Method)4 XppReader (com.thoughtworks.xstream.io.xml.XppReader)3 Metacard (ddf.catalog.data.Metacard)3 CannotResolveClassException (com.thoughtworks.xstream.mapper.CannotResolveClassException)2 CatalogTransformerException (ddf.catalog.transform.CatalogTransformerException)2 ActionEvent (java.awt.event.ActionEvent)2 Serializable (java.io.Serializable)2 HashMap (java.util.HashMap)2 IllegalUserActionException (org.apache.jmeter.exceptions.IllegalUserActionException)2 HashTree (org.apache.jorphan.collections.HashTree)2 XmlPullParser (org.xmlpull.v1.XmlPullParser)2 XmlPullParserException (org.xmlpull.v1.XmlPullParserException)2 XStream (com.thoughtworks.xstream.XStream)1 SingleValueConverter (com.thoughtworks.xstream.converters.SingleValueConverter)1 NonExistentFieldException (com.thoughtworks.xstream.converters.reflection.NonExistentFieldException)1 StreamException (com.thoughtworks.xstream.io.StreamException)1 HierarchicalStreamCopier (com.thoughtworks.xstream.io.copy.HierarchicalStreamCopier)1