[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone.issue-182: dc0bcdde415716d2a
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone.issue-182: dc0bcdde415716d2a6cd751b2fb5315d0daec265 |
Date: |
Mon, 12 Sep 2011 13:09:12 +0200 (CEST) |
revision: dc0bcdde415716d2a6cd751b2fb5315d0daec265
date: 2011-09-08T10:02:09
author: address@hidden
branch: net.venge.monotone.issue-182
changelog:
Make transform failures recoverable even with botan 1.10.x.
We have to deal with the fact that Botan::Invalid_Argument no longer derives
from Botan::Exception. So now we use std::exception as the common base
class which we handle in error_in_transform.
manifest:
format_version "1"
new_manifest [70aa2ef334f496534046489f3bde1124c7ce5653]
old_revision [30c022e6012f74f2b407b0cba7782fce17a041f4]
patch "src/transforms.cc"
from [cdfb6854ef4992faba21074145f3c8269b845b11]
to [789e01bbff42020d04d8dba8f6b97588fbe4ca3d]
============================================================
--- src/transforms.cc cdfb6854ef4992faba21074145f3c8269b845b11
+++ src/transforms.cc 789e01bbff42020d04d8dba8f6b97588fbe4ca3d
@@ -53,10 +53,10 @@ using Botan::Hash_Filter;
// paradigm "must" be used. this program is intended for source code
// control and I make no bones about it.
-NORETURN(static inline void error_in_transform(Botan::Exception & e));
+NORETURN(static inline void error_in_transform(std::exception & e));
static inline void
-error_in_transform(Botan::Exception & e, origin::type caused_by)
+error_in_transform(std::exception & e, origin::type caused_by)
{
// these classes can all indicate data corruption
if (typeid(e) == typeid(Botan::Encoding_Error)
@@ -107,7 +107,7 @@ error_in_transform(Botan::Exception & e,
pipe->process_msg(in); \
out = pipe->read_all_as_string(Pipe::LAST_MESSAGE); \
} \
- catch (Botan::Exception & e) \
+ catch (std::exception & e) \
{ \
pipe.reset(new Pipe(new T(carg))); \
error_in_transform(e, made_from); \
@@ -173,7 +173,7 @@ template<> string xform<Botan::Hex_Decod
{
throw Botan::Decoding_Error(string("invalid hex character '") + (char)c + "'");
}
- catch(Botan::Exception & e)
+ catch(std::exception & e)
{
error_in_transform(e, made_from);
}
@@ -219,7 +219,7 @@ void pack(T const & in, base64< gzip<T>
tmp = pipe->read_all_as_string(Pipe::LAST_MESSAGE);
out = base64< gzip<T> >(tmp, in.made_from);
}
- catch (Botan::Exception & e)
+ catch (std::exception & e)
{
pipe.reset(new Pipe(new Gzip_Compression,
new Base64_Encoder));
@@ -237,7 +237,7 @@ void unpack(base64< gzip<T> > const & in
pipe->process_msg(in());
out = T(pipe->read_all_as_string(Pipe::LAST_MESSAGE), in.made_from);
}
- catch (Botan::Exception & e)
+ catch (std::exception & e)
{
pipe.reset(new Pipe(new Base64_Decoder,
new Gzip_Decompression));
@@ -264,7 +264,7 @@ calculate_ident(data const & dat,
p->process_msg(dat());
ident = id(p->read_all_as_string(Pipe::LAST_MESSAGE), dat.made_from);
}
- catch (Botan::Exception & e)
+ catch (std::exception & e)
{
p.reset(new Pipe(new Hash_Filter("SHA-160")));
error_in_transform(e, dat.made_from);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone.issue-182: dc0bcdde415716d2a6cd751b2fb5315d0daec265,
code <=