io.vertx.lang.js.ThrowableConverter Maven / Gradle / Ivy
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