try {
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, value);
} catch (PropertyException e) {
- throw new IllegalStateException("Unable to setup pretty print");
+ throw new IllegalStateException("Unable to setup pretty print", e);
}
}
try {
return jar.getInputStream(jarEntry);
} catch (IOException e) {
- throw new IllegalStateException(format("Unable to get stream for entry %s | jar %s", jar, jarEntry));
+ throw new IllegalStateException(format("Unable to get stream for entry %s | jar %s", jar, jarEntry), e);
}
}
try {
return url.toURI();
} catch (URISyntaxException e) {
- throw new IllegalStateException(format("Unable to convert URL %s to URI", url));
+ throw new IllegalStateException(format("Unable to convert URL %s to URI", url), e);
}
}
try {
parentInstanceId = serializer.toBinding(parentYangId);
} catch (DeserializationException e) {
- throw new IllegalArgumentException(String.format("Unable to deserialize %s", parentYangId));
+ throw new IllegalArgumentException(String.format("Unable to deserialize %s", parentYangId), e);
}
if (!parentInstanceId.isPresent()) {
throw new IllegalArgumentException(String.format("Unable to create node binding for %s|%s", identifier, data));
});
} catch (DeserializationException e) {
- throw new IllegalArgumentException(String.format("Unable to deserialize node %s|%s", identifier, data));
+ throw new IllegalArgumentException(String.format("Unable to deserialize node %s|%s", identifier, data), e);
}
}
throw new IllegalArgumentException(String.format("Unable convert %s to binding", identifier));
});
} catch (DeserializationException e) {
- throw new IllegalArgumentException(String.format("Unable to deserialize %s", identifier));
+ throw new IllegalArgumentException(String.format("Unable to deserialize %s", identifier), e);
}
}
}
try {
FieldUtils.writeField(field, testInstance, data);
} catch (IllegalAccessException e) {
- throw new IllegalStateException("Unable to access field " + field);
+ throw new IllegalStateException("Unable to access field " + field, e);
}
}
try {
return YangInstanceIdentifier.of(QName.class.cast(type.getField("QNAME").get(null)));
} catch (IllegalAccessException e) {
- throw new IllegalStateException("Constant QNAME not accessible for type" + type);
+ throw new IllegalStateException("Constant QNAME not accessible for type" + type, e);
} catch (NoSuchFieldException e) {
- throw new IllegalStateException("Class " + type + " does not have QName defined");
+ throw new IllegalStateException("Class " + type + " does not have QName defined", e);
}
}