#include <senf/Utils/Exception.hh>
#define prefix_ inline
-///////////////////////////////cti.p///////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::Packet
// conversion constructors
const
{
if (!is<OtherPacket>())
- throw WrapException<std::bad_cast>(std::bad_cast());
+ throw WrapException<std::bad_cast>(std::bad_cast())
+ << ": called packet::as() with wrong PacketType: "
+ << (valid() ? typeId().prettyName() : "invalid packet")
+ << " != " << prettyName(typeid(OtherPacket));
return OtherPacket(ptr()->as<typename OtherPacket::type>());
}
return ptr()->annotation<Annotation>();
}
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::ConcretePacket<PacketType>
// structors and default members
return static_cast< PacketInterpreter<PacketType> *>( Packet::ptr().get());
}
-///////////////////////////////cti.e///////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#undef prefix_
\f