This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// public API method | |
public void someMethod() throws Exception { | |
try { | |
// some work happens here, maybe not my code | |
} catch (final Throwable t) { | |
if(t instanceof Exception || t instanceof Error) | |
// if t is an Exception or a RuntimeException the method signature already declares it | |
// if t is an Error then it is not a checked exception in the first place | |
throw UnsafeUtil.unchecked(t); | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>software.leonov.config</groupId> | |
<artifactId>optional-config</artifactId> | |
<version>1.4.3RC1</version> | |
<name>Optional Config</name> |