Skip to content

Commit

Permalink
Merge pull request #205 from XerTheSquirrel/issue-204-crashrcconf
Browse files Browse the repository at this point in the history
Correct fatal crash related to missing configuration resource.
  • Loading branch information
XerTheSquirrel authored Nov 13, 2018
2 parents 00391ae + e401ae8 commit 14e79cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.iopipe</groupId>
<artifactId>iopipe</artifactId>
<version>1.10.0</version>
<version>1.10.1</version>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<url>https://www.iopipe.com/</url>
<scm>
<connection>scm:git:https://github.com/iopipe/iopipe-java.git</connection>
<url>https://github.com/iopipe/iopipe-java</url>
<tag>1.10.0</tag>
<tag>1.10.1</tag>
</scm>
<developers>
<developer>
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/com/iopipe/IOpipeConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,16 @@ else if (__a == null)
try (InputStream intwo = IOpipeConfiguration.class.
getResourceAsStream("/iopipe.properties"))
{
props.load(intwo);
if (intwo != null)
props.load(intwo);
}
}
catch (IOException|SecurityException e)

// Ignore all exceptions that may occur during this process
catch (Throwable e)
{
Logger.error(e, "Could not load the configuration due " +
"to an exception.");
}
_PROPERTIES = props;

Expand Down

0 comments on commit 14e79cb

Please sign in to comment.