// Copyright (C) 2011 The Android Open Source Project
//
// 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.gerrit.server.git;

import org.eclipse.jgit.revwalk.RevCommit;

/**
 * Thrown when creation of a code review note fails.
 */
public class CodeReviewNoteCreationException extends Exception {
  private static final long serialVersionUID = 1L;

  public CodeReviewNoteCreationException(final String msg) {
    super(msg);
  }

  public CodeReviewNoteCreationException(final Throwable why) {
    super(why);
  }

  public CodeReviewNoteCreationException(final RevCommit commit,
      final Throwable cause) {
    super("Couldn't create code review note for the following commit: "
        + commit.name(), cause);
  }
}
