Mercurial > hg4j
comparison 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 |
comparison
equal
deleted
inserted
replaced
214:4252faa556cd | 215:41a778e3fd31 |
---|---|
15 * contact TMate Software at support@hg4j.com | 15 * contact TMate Software at support@hg4j.com |
16 */ | 16 */ |
17 package org.tmatesoft.hg.core; | 17 package org.tmatesoft.hg.core; |
18 | 18 |
19 import org.tmatesoft.hg.repo.HgDataFile; | 19 import org.tmatesoft.hg.repo.HgDataFile; |
20 import org.tmatesoft.hg.util.Path; | |
20 | 21 |
21 /** | 22 /** |
22 * Any erroneous state with @link {@link HgDataFile} input/output, read/write operations | 23 * Any erroneous state with @link {@link HgDataFile} input/output, read/write operations |
23 * | 24 * |
24 * @author Artem Tikhomirov | 25 * @author Artem Tikhomirov |
25 * @author TMate Software Ltd. | 26 * @author TMate Software Ltd. |
26 */ | 27 */ |
27 @SuppressWarnings("serial") | 28 @SuppressWarnings("serial") |
28 public class HgDataStreamException extends HgException { | 29 public class HgDataStreamException extends HgException { |
30 private final Path fname; | |
29 | 31 |
30 public HgDataStreamException(String message, Throwable cause) { | 32 public HgDataStreamException(Path file, String message, Throwable cause) { |
31 super(message, cause); | 33 super(message, cause); |
34 fname = file; | |
35 } | |
36 | |
37 public HgDataStreamException(Path file, Throwable cause) { | |
38 super(cause); | |
39 fname = file; | |
40 } | |
41 | |
42 public Path getFileName() { | |
43 return fname; | |
32 } | 44 } |
33 } | 45 } |