X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FPacket.cti;h=8184317b55dbceefd839631076fd5b3276ba154b;hb=7ee689fe38d66aa3a0004d55e8708750d35adc0b;hp=d8e06c13d08f67943f0b0d2db0e12be51c3d2336;hpb=7661548b20e6c7627f54bff87e0758396fd523ef;p=senf.git diff --git a/senf/Packets/Packet.cti b/senf/Packets/Packet.cti index d8e06c1..8184317 100644 --- a/senf/Packets/Packet.cti +++ b/senf/Packets/Packet.cti @@ -62,7 +62,10 @@ prefix_ OtherPacket senf::Packet::as() const { if (!is()) - throw WrapException(std::bad_cast()); + throw WrapException(std::bad_cast()) + << ": called packet::as() with wrong PacketType: " + << (valid() ? typeId().prettyName() : "invalid packet") + << " != " << prettyName(typeid(OtherPacket)); return OtherPacket(ptr()->as()); }