diff src/org/tmatesoft/hg/internal/DigestHelper.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 0a2f445de774
children 9c9c442b5f2e
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/DigestHelper.java	Wed Sep 14 04:41:57 2011 +0200
+++ b/src/org/tmatesoft/hg/internal/DigestHelper.java	Fri Sep 16 05:35:32 2011 +0200
@@ -21,6 +21,7 @@
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 
+import org.tmatesoft.hg.core.HgBadStateException;
 import org.tmatesoft.hg.core.Nodeid;
 
 
@@ -49,7 +50,7 @@
 				sha1 = MessageDigest.getInstance("SHA-1");
 			} catch (NoSuchAlgorithmException ex) {
 				// could hardly happen, JDK from Sun always has sha1.
-				ex.printStackTrace(); // FIXME log error
+				throw new HgBadStateException(ex);
 			}
 		}
 		return sha1;