mirror of https://github.com/apache/jclouds.git
added debug when parsing fails
This commit is contained in:
parent
169006b3ed
commit
8c5e03a9a5
|
@ -43,14 +43,14 @@ import com.google.inject.name.Named;
|
|||
*/
|
||||
@Singleton
|
||||
public class JAXBParser implements XMLParser {
|
||||
|
||||
|
||||
/** Boolean indicating if the output must be pretty printed. */
|
||||
private Boolean prettyPrint;
|
||||
|
||||
|
||||
@Inject
|
||||
public JAXBParser(@Named(Constants.PROPERTY_PRETTY_PRINT_PAYLOADS) String prettyPrint) {
|
||||
super();
|
||||
this.prettyPrint = Boolean.valueOf(prettyPrint);
|
||||
super();
|
||||
this.prettyPrint = Boolean.valueOf(prettyPrint);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -81,7 +81,7 @@ public class JAXBParser implements XMLParser {
|
|||
Unmarshaller unmarshaller = context.createUnmarshaller();
|
||||
return (T) unmarshaller.unmarshal(reader);
|
||||
} 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