/*
 * Copyright (C) 2016 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.copybara;

import java.nio.file.Path;
import java.nio.file.PathMatcher;

/**
 * An exception that indicates a file that was to be written to a destination is not actually
 * included in {@code destination_files}, indicating a bad configuration.
 */
public class NotADestinationFileException extends RepoException {

  public NotADestinationFileException(String message) {
    super(message);
  }
}

/*
 * Copyright (C) 2016 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.copybara;

import java.nio.file.Path;
import java.nio.file.PathMatcher;

/**
 * An exception that indicates a file that was to be written to a destination is not actually
 * included in {@code destination_files}, indicating a bad configuration.
 */
public class NotADestinationFileException extends ValidationException {

  NotADestinationFileException(String message) {
    super(message);
  }
}

Use ValidationException for destination_files error
Use ValidationException for destination_files error

Throw VE when an unexpected file appears in the destination that is
not matched by the destination_files glob.

This is always a user error so we shouldn't use RepoException for
this.

Change-Id: I7d233a2729d91be92984f9904c8e07b57331d8c8
