Skip to content

Commit 0924b53

Browse files
committed
Boost Exception serialization hook
1 parent 74bea78 commit 0924b53

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/boost/exception/exception.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ boost
175175
{
176176
class error_info_base;
177177
struct type_info_;
178+
class encoder;
178179

179180
struct
180181
error_info_container
@@ -185,6 +186,7 @@ boost
185186
virtual void add_ref() const = 0;
186187
virtual bool release() const = 0;
187188
virtual refcount_ptr<exception_detail::error_info_container> clone() const = 0;
189+
virtual void serialize_to( encoder & ) const { }
188190

189191
protected:
190192

@@ -227,6 +229,9 @@ boost
227229

228230
void copy_boost_exception( exception *, exception const * );
229231

232+
template <class Encoder>
233+
void serialize_diagnostic_information_to_impl_( exception const *, std::exception const *, Encoder & );
234+
230235
template <class E,class Tag,class T>
231236
E const & set_info( E const &, error_info<Tag,T> const & );
232237

@@ -321,6 +326,7 @@ boost
321326
friend struct exception_detail::set_info_rv<throw_line>;
322327
friend struct exception_detail::set_info_rv<throw_column>;
323328
friend void exception_detail::copy_boost_exception( exception *, exception const * );
329+
template <class Encoder> friend void exception_detail::serialize_diagnostic_information_to_impl_( exception const *, std::exception const *, Encoder & );
324330
#endif
325331
mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_;
326332
mutable char const * throw_function_;

0 commit comments

Comments
 (0)