Mercurial > jhg
annotate src/org/tmatesoft/hg/core/HgRevisionIntegrityException.java @ 565:78a9e26e670d
Refactor common code to initialize changelog revision for a command into standalone class
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 09 Apr 2013 17:15:30 +0200 |
parents | 95c2f43008bd |
children |
rev | line source |
---|---|
531
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
1 /* |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
2 * Copyright (c) 2013 TMate Software Ltd |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
3 * |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
4 * This program is free software; you can redistribute it and/or modify |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
6 * the Free Software Foundation; version 2 of the License. |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
7 * |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
8 * This program is distributed in the hope that it will be useful, |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
11 * GNU General Public License for more details. |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
12 * |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
13 * For information on how to redistribute this software under |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
14 * the terms of a license other than GNU General Public License |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
15 * contact TMate Software at support@hg4j.com |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
16 */ |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
17 package org.tmatesoft.hg.core; |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
18 |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
19 import java.io.File; |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
20 |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
21 import org.tmatesoft.hg.repo.HgInvalidControlFileException; |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
22 import org.tmatesoft.hg.repo.HgInvalidFileException; |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
23 |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
24 /** |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
25 * Thrown to indicate integrity issues with a revision, namely, when digest (SHA1) over revision data |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
26 * doesn't match revision id. |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
27 * |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
28 * @author Artem Tikhomirov |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
29 * @author TMate Software Ltd. |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
30 */ |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
31 @SuppressWarnings("serial") |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
32 public class HgRevisionIntegrityException extends HgInvalidControlFileException { |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
33 |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
34 /** |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
35 * See {@link HgInvalidFileException#HgInvalidFileException(String, Throwable, File)} for parameters description. |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
36 */ |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
37 public HgRevisionIntegrityException(String message, Throwable th, File file) { |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
38 super(message, th, file); |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
39 } |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
40 |
95c2f43008bd
Throw specific exception when checksum calculation fails
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
41 } |