summaryrefslogtreecommitdiff
path: root/node/Packet.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-07-17 14:21:09 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-07-17 14:21:09 -0700
commitb9e1d53d7ac4e8d19520e3063b194ee01f550198 (patch)
tree9aad6b77f36c7f221f5d6b660e6522fc3cfaae02 /node/Packet.hpp
parentab0806a036485979d60015a22a8e8831b68643a2 (diff)
downloadinfinitytier-b9e1d53d7ac4e8d19520e3063b194ee01f550198.tar.gz
infinitytier-b9e1d53d7ac4e8d19520e3063b194ee01f550198.zip
Minor cleanup.
Diffstat (limited to 'node/Packet.hpp')
-rw-r--r--node/Packet.hpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/node/Packet.hpp b/node/Packet.hpp
index 4192b4e3..97c9774e 100644
--- a/node/Packet.hpp
+++ b/node/Packet.hpp
@@ -424,8 +424,7 @@ public:
}
template<unsigned int C2>
- Fragment(const Buffer<C2> &b)
- throw(std::out_of_range) :
+ Fragment(const Buffer<C2> &b) :
Buffer<ZT_PROTO_MAX_PACKET_LENGTH>(b)
{
}
@@ -443,10 +442,8 @@ public:
* @param fragLen Length of fragment in bytes
* @param fragNo Which fragment (>= 1, since 0 is Packet with end chopped off)
* @param fragTotal Total number of fragments (including 0)
- * @throws std::out_of_range Packet size would exceed buffer
*/
Fragment(const Packet &p,unsigned int fragStart,unsigned int fragLen,unsigned int fragNo,unsigned int fragTotal)
- throw(std::out_of_range)
{
init(p,fragStart,fragLen,fragNo,fragTotal);
}
@@ -459,13 +456,11 @@ public:
* @param fragLen Length of fragment in bytes
* @param fragNo Which fragment (>= 1, since 0 is Packet with end chopped off)
* @param fragTotal Total number of fragments (including 0)
- * @throws std::out_of_range Packet size would exceed buffer
*/
inline void init(const Packet &p,unsigned int fragStart,unsigned int fragLen,unsigned int fragNo,unsigned int fragTotal)
- throw(std::out_of_range)
{
if ((fragStart + fragLen) > p.size())
- throw std::out_of_range("Packet::Fragment: tried to construct fragment of packet past its length");
+ throw ZT_EXCEPTION_OUT_OF_BOUNDS;
setSize(fragLen + ZT_PROTO_MIN_FRAGMENT_LENGTH);
// NOTE: this copies both the IV/packet ID and the destination address.