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

com.taobao.metamorphosis.utils.ThreadUtils Maven / Gradle / Ivy

package com.taobao.metamorphosis.utils;

/**
 * Created with IntelliJ IDEA.
 * User: dennis ([email protected])
 * Date: 13-3-3
 * Time: ????11:26
 */
public class ThreadUtils {
    public static RuntimeException launderThrowable(Throwable t) {
        if (t instanceof RuntimeException) {
            return (RuntimeException) t;
        } else if (t instanceof Error) {
            throw (Error) t;
        } else {
            throw new IllegalStateException("Not unchecked", t);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy