Could someone please provide some good practice to handle exceptions in exception for example I have
try {
...
DeserializationResult deserialization = xmlSerializationService.deserializeFromXml(node);
some code here
} catch (Exception e) {
try {
//I need to create process result xml with error code and some details
// creation of result xml document
} catch (Exception e) {
// maybe some error message here
}
}
can I somehow make this code looks clearer, noiseless and easier to understand? Thanks for answers. P.S. I know that using general exception is not good practice, its just for example purpose here.