diff src/org/tmatesoft/hg/repo/HgDirstate.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 9774f47d904d
children 72c6eda838a6
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgDirstate.java	Wed Sep 14 04:41:57 2011 +0200
+++ b/src/org/tmatesoft/hg/repo/HgDirstate.java	Fri Sep 16 05:35:32 2011 +0200
@@ -144,7 +144,8 @@
 				}
 			}
 		} catch (IOException ex) {
-			ex.printStackTrace(); // FIXME log error, clean dirstate?
+			repo.getContext().getLog().error(getClass(), ex, null); 
+			// FIXME clean dirstate?
 		} finally {
 			da.done();
 		}
@@ -218,7 +219,7 @@
 				branch = b == null || b.length() == 0 ? HgRepository.DEFAULT_BRANCH_NAME : b;
 				r.close();
 			} catch (IOException ex) {
-				ex.printStackTrace(); // XXX log verbose debug, exception might be legal here (i.e. FileNotFound)
+				repo.getContext().getLog().debug(HgDirstate.class, ex, null); // log verbose debug, exception might be legal here (i.e. FileNotFound)
 				// IGNORE
 			}
 		}