Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgInvalidFileException.java @ 628:6526d8adbc0f
Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Wed, 22 May 2013 15:52:31 +0200 |
| parents | 95c2f43008bd |
| children |
comparison
equal
deleted
inserted
replaced
| 627:5153eb73b18d | 628:6526d8adbc0f |
|---|---|
| 16 */ | 16 */ |
| 17 package org.tmatesoft.hg.repo; | 17 package org.tmatesoft.hg.repo; |
| 18 | 18 |
| 19 import java.io.File; | 19 import java.io.File; |
| 20 import java.io.IOException; | 20 import java.io.IOException; |
| 21 | |
| 22 import org.tmatesoft.hg.util.Path; | |
| 21 | 23 |
| 22 /** | 24 /** |
| 23 * Thrown when there are troubles working with local file. Most likely (but not necessarily) wraps IOException. Might be | 25 * Thrown when there are troubles working with local file. Most likely (but not necessarily) wraps IOException. Might be |
| 24 * perceived as specialized IOException with optional File and other repository information. | 26 * perceived as specialized IOException with optional File and other repository information. |
| 25 * | 27 * |
| 57 public HgInvalidFileException setFile(File file) { | 59 public HgInvalidFileException setFile(File file) { |
| 58 assert file != null; // doesn't allow null not to clear file accidentally | 60 assert file != null; // doesn't allow null not to clear file accidentally |
| 59 details.setFile(file); | 61 details.setFile(file); |
| 60 return this; | 62 return this; |
| 61 } | 63 } |
| 64 | |
| 65 @Override | |
| 66 public HgInvalidFileException setFileName(Path name) { | |
| 67 super.setFileName(name); | |
| 68 return this; | |
| 69 } | |
| 62 | 70 |
| 63 /** | 71 /** |
| 64 * @return file object that causes troubles, or <code>null</code> if specific file is unknown | 72 * @return file object that causes troubles, or <code>null</code> if specific file is unknown |
| 65 */ | 73 */ |
| 66 public File getFile() { | 74 public File getFile() { |
