Mercurial > jhg
diff src/org/tmatesoft/hg/repo/HgBranches.java @ 295:981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 16 Sep 2011 05:35:32 +0200 |
parents | 4b661efb9374 |
children | 3f40262153a4 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgBranches.java Wed Sep 14 04:41:57 2011 +0200 +++ b/src/org/tmatesoft/hg/repo/HgBranches.java Fri Sep 16 05:35:32 2011 +0200 @@ -89,13 +89,13 @@ } return lastInCache; } catch (IOException ex) { - ex.printStackTrace(); // XXX log error, but otherwise do nothing + repo.getContext().getLog().warn(getClass(), ex, null); // log error, but otherwise do nothing } finally { if (br != null) { try { br.close(); } catch (IOException ex) { - ex.printStackTrace(); // ignore + repo.getContext().getLog().info(getClass(), ex, null); // ignore } } } @@ -283,9 +283,8 @@ } } bw.close(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + } catch (IOException ex) { + repo.getContext().getLog().error(getClass(), ex, "Error writing branch cache file"); } }