All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.chutneytesting.tools.UncheckedException Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package com.chutneytesting.tools;

/**
 * Specific {@link RuntimeException} thrown when checked {@link Exception} occurs in ThrowingFunctions.
* Checked {@link Exception} is set as cause. * * @see ThrowingFunction#toUnchecked(ThrowingFunction) */ @SuppressWarnings("serial") public class UncheckedException extends RuntimeException { private UncheckedException(Exception checkedException) { super("Occurred in silenced function", checkedException); } public static RuntimeException throwUncheckedException(Exception e) { if (e instanceof RuntimeException) { return (RuntimeException) e; } else { return new UncheckedException(e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy