From 777ee0484319c34157840fe56dd8623701a3565e Mon Sep 17 00:00:00 2001 From: Joel Bender Date: Tue, 23 May 2017 02:38:25 -0400 Subject: [PATCH] slightly better error message --- py27/bacpypes/vlan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py27/bacpypes/vlan.py b/py27/bacpypes/vlan.py index 855e6ff..fee2006 100755 --- a/py27/bacpypes/vlan.py +++ b/py27/bacpypes/vlan.py @@ -57,7 +57,7 @@ class Network: return if not pdu.pduDestination or not isinstance(pdu.pduDestination, Address): - raise RuntimeError("invalid destination address") + raise RuntimeError("invalid destination address: %r" % (pdu.pduDestination,)) elif pdu.pduDestination.addrType == Address.localBroadcastAddr: for n in self.nodes: @@ -70,7 +70,7 @@ class Network: n.response(deepcopy(pdu)) else: - raise RuntimeError("invalid destination address type") + raise RuntimeError("invalid destination address type: %r" % (pdu.pduDestination,)) def __len__(self): """ Simple way to determine the number of nodes in the network. """