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

io.vertx.lang.js.ThrowableConverter Maven / Gradle / Ivy

There is a newer version: 4.0.0-milestone4
Show newest version
package io.vertx.lang.js;

import java.util.concurrent.Callable;

/**
 * @author Julien Viet
 */
public class ThrowableConverter {

  public static Throwable catchAndReturnThrowable(Callable c) {
    try {
      c.call();
    } catch (Throwable t) {
      return t;
    }
    throw new AssertionError("Should not happen");
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy