diff src/org/tmatesoft/hg/core/HgDataStreamException.java @ 215:41a778e3fd31

Issue 5: Facilities for progress and cancellation. More specific exceptions. Exceptions from callbacks as RuntimeException
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 17 May 2011 00:56:54 +0200
parents 1a7a9a20e1f9
children 6d1804fe0ed7
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgDataStreamException.java	Mon May 16 21:10:36 2011 +0200
+++ b/src/org/tmatesoft/hg/core/HgDataStreamException.java	Tue May 17 00:56:54 2011 +0200
@@ -17,6 +17,7 @@
 package org.tmatesoft.hg.core;
 
 import org.tmatesoft.hg.repo.HgDataFile;
+import org.tmatesoft.hg.util.Path;
 
 /**
  * Any erroneous state with @link {@link HgDataFile} input/output, read/write operations 
@@ -26,8 +27,19 @@
  */
 @SuppressWarnings("serial")
 public class HgDataStreamException extends HgException {
+	private final Path fname;
 
-	public HgDataStreamException(String message, Throwable cause) {
+	public HgDataStreamException(Path file, String message, Throwable cause) {
 		super(message, cause);
+		fname = file;
+	}
+	
+	public HgDataStreamException(Path file, Throwable cause) {
+		super(cause);
+		fname = file;
+	}
+
+	public Path getFileName() {
+		return fname;
 	}
 }