diff 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
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgIOException.java	Wed Jul 10 16:41:49 2013 +0200
+++ b/src/org/tmatesoft/hg/core/HgIOException.java	Wed Jul 10 19:33:51 2013 +0200
@@ -29,7 +29,7 @@
  */
 @SuppressWarnings("serial")
 public class HgIOException extends HgException {
-	private final File file;
+	private File file;
 
 	public HgIOException(String message, File troubleFile) {
 		this(message, null, troubleFile);
@@ -38,7 +38,7 @@
 	/**
 	 * @param message describes the issue, never <code>null</code>
 	 * @param cause root cause for the error, likely {@link IOException} or its subclass, but not necessarily, and may be omitted. 
-	 * @param troubleFile file we tried to deal with, never <code>null</code>
+	 * @param troubleFile file we tried to deal with, or <code>null</code> if set later
 	 */
 	public HgIOException(String message, Throwable cause, File troubleFile) {
 		super(message, cause);
@@ -51,4 +51,12 @@
 	public File getFile() {
 		return file;
 	}
+
+	/**
+	 * @return <code>this</code> for convenience
+	 */
+	public HgIOException setFile(File f) {
+		file = f;
+		return this;
+	}
 }