package com.atlassian.bitbucket.repository;

import com.atlassian.bitbucket.i18n.KeyedMessage;
import com.atlassian.bitbucket.project.Project;
import com.atlassian.bitbucket.NoSuchEntityException;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class NoSuchRepositoryException extends NoSuchEntityException {

    private static final long serialVersionUID = -1877441431309452254L;
    
    private final Project project;

    public NoSuchRepositoryException(@Nonnull KeyedMessage message, @Nullable Project project) {
        super(message);

        this.project = project;
    }

    public NoSuchRepositoryException(@Nonnull KeyedMessage message, @Nullable Throwable cause,
                                     @Nullable Project project) {
        super(message, cause);

        this.project = project;
    }

    @Nullable
    public Project getProject() {
        return project;
    }
}
