I have this code:
contact.getUseTypes().forEach(useType -> {
try {
Method methodSet = JLM0K2.class.getDeclaredMethod("set" + useType.getCode().getCampoMainframe(),
String.class);
methodSet.invoke(jlk2Req, contact.getContactPointId());
} catch (Exception e) {
FormalizationServiceImpl.log.error("Error: " + useType.getCode().getCampoMainframe(), e);
}
});
I am already logging. What am I doing wrong?
ps: I can’t throw this exception.