java.lang.Object
io.github.eutro.wasm2j.embed.internal.Utils

public class Utils extends Object
Miscellaneous utilities.
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • rethrow

      public static RuntimeException rethrow(Throwable t)
      Rethrow the throwable. If it can be thrown unchecked, it will be, otherwise it will be wrapped in a RuntimeException.

      This method does not return, but it is typed to return a runtime exception so the calling code can write:

      
       try {
           // ...
       } catch (Throwable t) {
           throw rethrow(t);
       }
       
      Parameters:
      t - The throwable.
      Returns:
      No it doesn't.