Mercurial > jhg
diff src/org/tmatesoft/hg/core/HgInvalidFileException.java @ 403:2747b0723867
FIXMEs: work on exceptions and javadoc
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 05 Mar 2012 14:50:51 +0100 |
parents | 0ae53c32ecef |
children |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgInvalidFileException.java Mon Feb 27 19:38:44 2012 +0100 +++ b/src/org/tmatesoft/hg/core/HgInvalidFileException.java Mon Mar 05 14:50:51 2012 +0100 @@ -36,20 +36,18 @@ @SuppressWarnings("serial") public class HgInvalidFileException extends HgException { - private File localFile; - public HgInvalidFileException(String message, Throwable th) { super(message, th); } public HgInvalidFileException(String message, Throwable th, File file) { super(message, th); - localFile = file; // allows null + extras.setFile(file); // allows null } public HgInvalidFileException setFile(File file) { assert file != null; // doesn't allow null not to clear file accidentally - localFile = file; + extras.setFile(file); return this; } @@ -57,23 +55,6 @@ * @return file object that causes troubles, or <code>null</code> if specific file is unknown */ public File getFile() { - return localFile; - } - - @Override - protected void appendDetails(StringBuilder sb) { - super.appendDetails(sb); - if (localFile != null) { - sb.append(';'); - sb.append(' '); - sb.append(" file:"); - sb.append(localFile.getPath()); - sb.append(','); - if (localFile.exists()) { - sb.append("EXISTS"); - } else { - sb.append("DOESN'T EXIST"); - } - } + return extras.getFile(); } }