mirror of https://github.com/apache/jclouds.git
added debug when parsing fails
This commit is contained in:
parent
169006b3ed
commit
8c5e03a9a5
|
@ -49,8 +49,8 @@ public class JAXBParser implements XMLParser {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public JAXBParser(@Named(Constants.PROPERTY_PRETTY_PRINT_PAYLOADS) String prettyPrint) {
|
public JAXBParser(@Named(Constants.PROPERTY_PRETTY_PRINT_PAYLOADS) String prettyPrint) {
|
||||||
super();
|
super();
|
||||||
this.prettyPrint = Boolean.valueOf(prettyPrint);
|
this.prettyPrint = Boolean.valueOf(prettyPrint);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -81,7 +81,7 @@ public class JAXBParser implements XMLParser {
|
||||||
Unmarshaller unmarshaller = context.createUnmarshaller();
|
Unmarshaller unmarshaller = context.createUnmarshaller();
|
||||||
return (T) unmarshaller.unmarshal(reader);
|
return (T) unmarshaller.unmarshal(reader);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new IOException("Could not unmarshall document", ex);
|
throw new IOException("Could not unmarshall document into type: " + type.getSimpleName() + "\n" + xml, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue