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

org.zodiac.sdk.simplenetty.exception.ExceptionHelper Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.sdk.simplenetty.exception;

//import sun.misc.Unsafe;

import org.zodiac.sdk.nio.common.Unsafe;

public class ExceptionHelper {

//    static final Unsafe UNSAFE;

    static {
        try {
//            Class unsafeClass = Class.forName("sun.misc.Unsafe");
//            Field field = unsafeClass.getDeclaredField("theUnsafe");
//            field.setAccessible(true);
//            UNSAFE = (Unsafe)field.get(null);
        } catch (Exception e) {
            throw new RuntimeException("UNSAFE get fail");
        }
    }

    public static  void throwException(E e) {
        Unsafe.throwException(e);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy