@@ -0,0 +1,1633 @@
+package to.etc.util;%0A%0Aimport org.eclipse.jdt.annotation.NonNullByDefault;%0Aimport org.eclipse.jdt.annotation.Nullable;%0Aimport to.etc.function.RunnableEx;%0Aimport to.etc.function.SupplierEx;%0A%0A/**%0A * ExceptionUtil%0A * A collection of utility methods for working with Exceptions%0A */%0A@NonNullByDefault%0Afinal public class ExceptionUtil %7B%0A%09private ExceptionUtil() %7B%7D%0A%0A%09/**%0A%09 * If runnable throws an exception, wraps the checked exception into a runtime.%0A%09 * @param runnableEx runnable%0A%09 */%0A%09public static void silentThrows(RunnableEx runnableEx)  %7B%0A%09%09try %7B%0A%09%09%09runnableEx.run();%0A%09%09%7Dcatch(Exception ex) %7B%0A%09%09%09throw WrappedException.wrap(ex);%0A%09%09%7D%0A%09%7D%0A%0A%09/**%0A%09 * If supplier throws an exception, wraps the checked exception into a runtime.%0A%09 * @param supplierEx runnable%0A%09 */%0A%09public static %3CT%3E T silentThrows(SupplierEx%3CT%3E supplierEx) %7B%0A%09%09try %7B%0A%09%09%09return supplierEx.get();%0A%09%09%7D catch(Exception e) %7B%0A%09%09%09throw WrappedException.wrap(e);%0A%09%09%7D%0A%09%7D%0A%0A%09/**%0A%09 * This method will run the runnable and if runnable throws an exception, the exception is ignored.%0A%09 * Use sparingly!%0A%09 * @param runnableEx runnable%0A%09 */%0A%09public static void silentFails(RunnableEx runnableEx) %7B%0A%09%09try %7B%0A%09%09%09runnableEx.run();%0A%09%09%7Dcatch(Exception ignored)%7B%7D%0A%09%7D%0A%0A%09/**%0A%09 * Runs the supplier. If the supplier fails, returns the default value.%0A%09 * @param supplierEx supplier%0A%09 * @param defaultValue default value%0A%09 * @param %3CT%3E any type.%0A%09 * @return value from the supplier or defaultValue%0A%09 */%0A%09@Nullable%0A%09public static %3CT%3E T silentFails(SupplierEx%3CT%3E supplierEx, @Nullable T defaultValue) %7B%0A%09%09try %7B%0A%09%09%09return supplierEx.get();%0A%09%09%7Dcatch(Exception ignored) %7B%0A%09%09%09return defaultValue;%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add exception utility.