Mercurial > jhg
comparison 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 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 294:32890bab7209 | 295:981f9f50bb6c | 
|---|---|
| 142 } else { | 142 } else { | 
| 143 // FIXME log error? | 143 // FIXME log error? | 
| 144 } | 144 } | 
| 145 } | 145 } | 
| 146 } catch (IOException ex) { | 146 } catch (IOException ex) { | 
| 147 ex.printStackTrace(); // FIXME log error, clean dirstate? | 147 repo.getContext().getLog().error(getClass(), ex, null); | 
| 148 // FIXME clean dirstate? | |
| 148 } finally { | 149 } finally { | 
| 149 da.done(); | 150 da.done(); | 
| 150 } | 151 } | 
| 151 } | 152 } | 
| 152 | 153 | 
| 216 b = b.trim().intern(); | 217 b = b.trim().intern(); | 
| 217 } | 218 } | 
| 218 branch = b == null || b.length() == 0 ? HgRepository.DEFAULT_BRANCH_NAME : b; | 219 branch = b == null || b.length() == 0 ? HgRepository.DEFAULT_BRANCH_NAME : b; | 
| 219 r.close(); | 220 r.close(); | 
| 220 } catch (IOException ex) { | 221 } catch (IOException ex) { | 
| 221 ex.printStackTrace(); // XXX log verbose debug, exception might be legal here (i.e. FileNotFound) | 222 repo.getContext().getLog().debug(HgDirstate.class, ex, null); // log verbose debug, exception might be legal here (i.e. FileNotFound) | 
| 222 // IGNORE | 223 // IGNORE | 
| 223 } | 224 } | 
| 224 } | 225 } | 
| 225 return branch; | 226 return branch; | 
| 226 } | 227 } | 
