X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FPacket.cti;h=8184317b55dbceefd839631076fd5b3276ba154b;hb=394ced7000128fef7e753caea1deda8d55dec8e2;hp=d8e06c13d08f67943f0b0d2db0e12be51c3d2336;hpb=57daeae6f2e924ce3f16f9677c3474f531cba9e5;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()); }