/*
 * This program and the accompanying materials are made available under the terms of the
 * Eclipse Public License v2.0 which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-v20.html
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Copyright Contributors to the Zowe Project.
 */

package org.zowe.pipelines.generic.exceptions.git

/**
 * An exception that is thrown when it is detected that the local branch is
 * behind the remote branch.
 */
class BehindRemoteException extends GitException {
    /**
     * The name of the local / remote branch.
     */
    final String branchName

    /**
     * Construct the exception.
     * @param message The exception message.
     * @param branchName The name of the local / remote branch.
     */
    BehindRemoteException(String message, String branchName) {
        super(message + "(branch = $branchName)")
        this.branchName = branchName
    }
}
