Class Throwables

java.lang.Object
net.orbyfied.coldlib.util.Throwables

public class Throwables extends Object
Utilities for dealing with throwables.
  • Method Details

    • sneakyThrow

      public static <T extends Throwable> void sneakyThrow(Throwable t) throws T
      Allows sneakily throwing an exception: This means any exception can be thrown without having to declare it in the method declaration. Useful for rethrowing exceptions.
      Type Parameters:
      T - The throwable type.
      Parameters:
      t - The throwable to throw.
      Throws:
      T - The throwable.