/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.audit.Audit
 *  com.l7tech.util.CausedIOException
 *  com.l7tech.util.ExceptionUtils
 */
package com.l7tech.server.util.res;

import com.l7tech.gateway.common.audit.Audit;
import com.l7tech.server.util.res.ResourceGetter;
import com.l7tech.util.CausedIOException;
import com.l7tech.util.ExceptionUtils;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.util.Map;

class a
extends ResourceGetter<R, M> {
    final Exception val$exception;

    a(Audit audit, Exception exception) {
        this.val$exception = exception;
        super(audit);
    }

    @Override
    public void close() {
    }

    @Override
    public R getResource(M m2, Map<String, Object> map) throws IOException, ResourceGetter.InvalidMessageException, ResourceGetter.UrlNotFoundException, ResourceGetter.MalformedResourceUrlException, ResourceGetter.UrlNotPermittedException, ResourceGetter.ResourceIOException, ResourceGetter.ResourceParseException, GeneralSecurityException {
        try {
            if (this.val$exception instanceof IOException) {
                throw (IOException)this.val$exception;
            }
        }
        catch (IOException iOException) {
            throw a.a(iOException);
        }
        try {
            if (this.val$exception instanceof ResourceGetter.InvalidMessageException) {
                throw (ResourceGetter.InvalidMessageException)this.val$exception;
            }
        }
        catch (IOException iOException) {
            throw a.a(iOException);
        }
        try {
            if (this.val$exception instanceof ResourceGetter.UrlNotFoundException) {
                throw (ResourceGetter.UrlNotFoundException)this.val$exception;
            }
        }
        catch (IOException iOException) {
            throw a.a(iOException);
        }
        try {
            if (this.val$exception instanceof ResourceGetter.MalformedResourceUrlException) {
                throw (ResourceGetter.MalformedResourceUrlException)this.val$exception;
            }
        }
        catch (IOException iOException) {
            throw a.a(iOException);
        }
        try {
            if (this.val$exception instanceof ResourceGetter.UrlNotPermittedException) {
                throw (ResourceGetter.UrlNotPermittedException)this.val$exception;
            }
        }
        catch (IOException iOException) {
            throw a.a(iOException);
        }
        try {
            if (this.val$exception instanceof ResourceGetter.ResourceIOException) {
                throw (ResourceGetter.ResourceIOException)this.val$exception;
            }
        }
        catch (IOException iOException) {
            throw a.a(iOException);
        }
        try {
            if (this.val$exception instanceof ResourceGetter.ResourceParseException) {
                throw (ResourceGetter.ResourceParseException)this.val$exception;
            }
        }
        catch (IOException iOException) {
            throw a.a(iOException);
        }
        try {
            if (this.val$exception instanceof GeneralSecurityException) {
                throw (GeneralSecurityException)this.val$exception;
            }
        }
        catch (IOException iOException) {
            throw a.a(iOException);
        }
        throw new CausedIOException(ExceptionUtils.getMessage((Throwable)this.val$exception), (Throwable)this.val$exception);
    }

    private static IOException a(IOException iOException) {
        return iOException;
    }
}

