Skip to content

Commit

Permalink
Merge pull request #88 from Julius278/xml-parser-logging
Browse files Browse the repository at this point in the history
improved xml parser logging in error case
  • Loading branch information
Julius278 authored Sep 2, 2024
2 parents b4d92e0 + e761b57 commit 50b0732
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public static <T> T unmarshalXml(String xml, Class<T> t) {
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
return (T) unmarshaller.unmarshal(reader);
} catch (JAXBException e) {
logger.error("unmarshalXml: jaxb error, ", e);
throw new SDCException(ExceptionId.SDC_JAXB_ERROR, e.getMessage(), 400);
}
}
Expand All @@ -119,7 +120,7 @@ public static <T> String marshalClassToXMLString(T t) {
jaxbMarshaller.marshal(t, writer);
return writer.toString();
} catch (JAXBException e) {
logger.error("jaxb error, ", e);
logger.error("marshalClassToXMLString: jaxb error, ", e);
throw new SDCException(ExceptionId.SDC_JAXB_ERROR, e.getMessage(), 400);
}
}
Expand Down

0 comments on commit 50b0732

Please sign in to comment.