// 
// Decompiled by Procyon v0.6.0
// 

package com.google.crypto.tink.internal;

public final class TinkBugException extends RuntimeException
{
    public TinkBugException(final String message) {
        super(message);
    }
    
    public TinkBugException(final String message, final Throwable cause) {
        super(message, cause);
    }
    
    public TinkBugException(final Throwable cause) {
        super(cause);
    }
    
    public static <T> T exceptionIsBug(final ThrowingSupplier<T> t) {
        try {
            return t.get();
        }
        catch (final Exception e) {
            throw new TinkBugException(e);
        }
    }
    
    public static void exceptionIsBug(final ThrowingRunnable v) {
        try {
            v.run();
        }
        catch (final Exception e) {
            throw new TinkBugException(e);
        }
    }
    
    public interface ThrowingSupplier<T>
    {
        T get() throws Exception;
    }
    
    public interface ThrowingRunnable
    {
        void run() throws Exception;
    }
}
