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

package org.bouncycastle.pkix.jcajce;

import org.bouncycastle.pkix.util.ErrorBundle;
import java.security.cert.CertPath;
import org.bouncycastle.pkix.util.LocalizedException;

public class CertPathReviewerException extends LocalizedException
{
    private int index;
    private CertPath certPath;
    
    public CertPathReviewerException(final ErrorBundle errorBundle, final Throwable t) {
        super(errorBundle, t);
        this.index = -1;
        this.certPath = null;
    }
    
    public CertPathReviewerException(final ErrorBundle errorBundle) {
        super(errorBundle);
        this.index = -1;
        this.certPath = null;
    }
    
    public CertPathReviewerException(final ErrorBundle errorBundle, final Throwable t, final CertPath certPath, final int index) {
        super(errorBundle, t);
        this.index = -1;
        this.certPath = null;
        if (certPath == null || index == -1) {
            throw new IllegalArgumentException();
        }
        if (index < -1 || index >= certPath.getCertificates().size()) {
            throw new IndexOutOfBoundsException();
        }
        this.certPath = certPath;
        this.index = index;
    }
    
    public CertPathReviewerException(final ErrorBundle errorBundle, final CertPath certPath, final int index) {
        super(errorBundle);
        this.index = -1;
        this.certPath = null;
        if (certPath == null || index == -1) {
            throw new IllegalArgumentException();
        }
        if (index < -1 || index >= certPath.getCertificates().size()) {
            throw new IndexOutOfBoundsException();
        }
        this.certPath = certPath;
        this.index = index;
    }
    
    public CertPath getCertPath() {
        return this.certPath;
    }
    
    public int getIndex() {
        return this.index;
    }
}
