comparison src/org/tmatesoft/hg/core/HgIOException.java @ 664:ae2d439fbed3

Utilize transaction when writing fncache. Better HgIOException
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 10 Jul 2013 19:33:51 +0200
parents 6526d8adbc0f
children
comparison
equal deleted inserted replaced
663:46b56864b483 664:ae2d439fbed3
27 * @author Artem Tikhomirov 27 * @author Artem Tikhomirov
28 * @author TMate Software Ltd. 28 * @author TMate Software Ltd.
29 */ 29 */
30 @SuppressWarnings("serial") 30 @SuppressWarnings("serial")
31 public class HgIOException extends HgException { 31 public class HgIOException extends HgException {
32 private final File file; 32 private File file;
33 33
34 public HgIOException(String message, File troubleFile) { 34 public HgIOException(String message, File troubleFile) {
35 this(message, null, troubleFile); 35 this(message, null, troubleFile);
36 } 36 }
37 37
38 /** 38 /**
39 * @param message describes the issue, never <code>null</code> 39 * @param message describes the issue, never <code>null</code>
40 * @param cause root cause for the error, likely {@link IOException} or its subclass, but not necessarily, and may be omitted. 40 * @param cause root cause for the error, likely {@link IOException} or its subclass, but not necessarily, and may be omitted.
41 * @param troubleFile file we tried to deal with, never <code>null</code> 41 * @param troubleFile file we tried to deal with, or <code>null</code> if set later
42 */ 42 */
43 public HgIOException(String message, Throwable cause, File troubleFile) { 43 public HgIOException(String message, Throwable cause, File troubleFile) {
44 super(message, cause); 44 super(message, cause);
45 file = troubleFile; 45 file = troubleFile;
46 } 46 }
49 * @return file that causes trouble, may be <code>null</code> 49 * @return file that causes trouble, may be <code>null</code>
50 */ 50 */
51 public File getFile() { 51 public File getFile() {
52 return file; 52 return file;
53 } 53 }
54
55 /**
56 * @return <code>this</code> for convenience
57 */
58 public HgIOException setFile(File f) {
59 file = f;
60 return this;
61 }
54 } 62 }