mirror of https://github.com/rusefi/rusefi.git
only: better error handling
This commit is contained in:
parent
50746557b3
commit
e354181d6c
|
@ -41,7 +41,11 @@ public class XmlUtil {
|
||||||
JAXBContext jaxbContext;
|
JAXBContext jaxbContext;
|
||||||
jaxbContext = JAXBContext.newInstance(modelClass);
|
jaxbContext = JAXBContext.newInstance(modelClass);
|
||||||
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
|
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
|
||||||
return (T) jaxbUnmarshaller.unmarshal(xmlFile);
|
try {
|
||||||
|
return (T) jaxbUnmarshaller.unmarshal(xmlFile);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new IllegalStateException("While reading " + xmlFile.getAbsolutePath(), e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue