Skip to content

Commit

Permalink
Refined exception causes
Browse files Browse the repository at this point in the history
  • Loading branch information
nimakarimipour committed Jan 26, 2022
1 parent b60540c commit c8b7d2d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@

import com.google.common.base.Preconditions;
import com.uber.nullaway.fixserialization.qual.AnnotationConfig;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;

/** Config class for Fix Serialization package. */
public class FixSerializationConfig {
Expand Down Expand Up @@ -89,7 +92,7 @@ public FixSerializationConfig(String configFilePath) {
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse(Files.newInputStream(Paths.get(configFilePath)));
document.normalize();
} catch (Exception e) {
} catch (IOException | SAXException | ParserConfigurationException e) {
throw new RuntimeException(
"Error in reading/parsing config at path: " + configFilePath + "\n" + e);
}
Expand Down

0 comments on commit c8b7d2d

Please sign in to comment.