summaryrefslogtreecommitdiff
path: root/src/LibsslARC4Encryptor.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/LibsslARC4Encryptor.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/LibsslARC4Encryptor.h')
-rw-r--r--src/LibsslARC4Encryptor.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/LibsslARC4Encryptor.h b/src/LibsslARC4Encryptor.h
index 49b8d5dc..9b47a225 100644
--- a/src/LibsslARC4Encryptor.h
+++ b/src/LibsslARC4Encryptor.h
@@ -38,6 +38,7 @@
#include "common.h"
#include "DlAbortEx.h"
#include "LibsslARC4Context.h"
+#include "StringFormat.h"
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -49,8 +50,9 @@ private:
void handleError() const
{
- throw new DlAbortEx("Exception in libssl routine(ARC4Encryptor class): %s",
- ERR_error_string(ERR_get_error(), 0));
+ throw DlAbortEx
+ (StringFormat("Exception in libssl routine(ARC4Encryptor class): %s",
+ ERR_error_string(ERR_get_error(), 0)).str());
}
public:
ARC4Encryptor() {}