summaryrefslogtreecommitdiff
path: root/src/messageDigest.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-04-27 02:22:14 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-04-27 02:22:14 +0000
commit1ef99931e131343f069a4b74edfc06196d72d85b (patch)
treed640f061a66a193d5f4d92b61836161208ccff14 /src/messageDigest.h
parenta7952cce05a41c6e20d6eddc569a8bffe974aade (diff)
2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten Exception class. Throw exception object, not its pointer and catch by reference, so that remove problematic delete operator for catched exception. * src/Exception.cc * src/Exception.h * test/ExceptionTest.cc * src/*: All files throwing/catching exception. * test/*: All files throwing/catching exception.
Diffstat (limited to 'src/messageDigest.h')
-rw-r--r--src/messageDigest.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/messageDigest.h b/src/messageDigest.h
index 62531ca5..f2642c69 100644
--- a/src/messageDigest.h
+++ b/src/messageDigest.h
@@ -38,6 +38,7 @@
#include "common.h"
#include "SharedHandle.h"
#include "DlAbortEx.h"
+#include "StringFormat.h"
#include <map>
#ifdef HAVE_LIBSSL
@@ -97,7 +98,9 @@ public:
{
DigestAlgoMap::const_iterator itr = digestAlgos.find(algostring);
if(itr == digestAlgos.end()) {
- throw new DlAbortEx("Digest algorithm %s is not supported.", algostring.c_str());
+ throw DlAbortEx
+ (StringFormat("Digest algorithm %s is not supported.",
+ algostring.c_str()).str());
}
return (*itr).second;
}