{
if (next())
impl().truncateInterpreters(next().get());
-
+
optional_range r (nextPacketRange());
if (!r)
throw InvalidPacketChainException();
-
+
ptr rv (packet->appendClone(&impl(), *r));
rv->data().resize(packet->data().size());
std::copy(packet->data().begin(), packet->data().end(), rv->data().begin());
prefix_ void senf::PacketInterpreterBase::dump(std::ostream & os)
{
- if (detail::AnnotationIndexerBase::maxAnnotations > 0) {
- os << "Annotations:\n";
- impl().dumpAnnotations(os);
+ try {
+ if (detail::AnnotationIndexerBase::maxAnnotations > 0) {
+ os << "Annotations:\n";
+ impl().dumpAnnotations(os);
+ }
+ v_dump(os);
+ for (ptr i (next()); i; i = i->next())
+ i->v_dump(os);
+ }
+ catch (senf::Exception & e) {
+ os << "[Exception: " << e.message() << "]\n";
}
- v_dump(os);
- for (ptr i (next()); i; i = i->next())
- i->v_dump(os);
}
prefix_ void senf::PacketInterpreterBase::finalizeThis()