Class Utils


  • public class Utils
    extends Object
    • Method Detail

      • convertToUnchecked

        public static RuntimeException convertToUnchecked​(Throwable t)
        Analyzes the type of the given Throwable, handing it back if it is a RuntimeException, wrapping it in a RuntimeException if it is a checked exception, or throwing it if it is an Error
        Parameters:
        t - the throwable
        Returns:
        a RuntimeException based on t
        Throws:
        Error - if t is an Error