Mercurial > jhg
diff src/org/tmatesoft/hg/core/HgException.java @ 320:678e326fd27c
Issue 15: Exception accessing oddly named file from history
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 30 Sep 2011 06:22:11 +0200 |
parents | 6d1804fe0ed7 |
children | 2fadf8695f8a |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgException.java Thu Sep 29 04:37:52 2011 +0200 +++ b/src/org/tmatesoft/hg/core/HgException.java Fri Sep 30 06:22:11 2011 +0200 @@ -84,10 +84,13 @@ protected void appendDetails(StringBuilder sb) { if (filename != null) { + sb.append("file:'"); sb.append(filename); - sb.append(':'); + sb.append('\''); + sb.append(';'); sb.append(' '); } + sb.append("rev:"); if (revNumber != BAD_REVISION) { sb.append(revNumber); if (revision != null) { @@ -99,6 +102,15 @@ } } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(super.toString()); + sb.append(' '); + sb.append('('); + appendDetails(sb); + sb.append(')'); + return sb.toString(); + } // /* XXX CONSIDER capability to pass extra information about errors */ // public static class Status { // public Status(String message, Throwable cause, int errorCode, Object extraData) {