Skip to content

Commit ab75534

Browse files
authored
Added exception when an unknown direction is supplied. (#1666)
1 parent 8b20f90 commit ab75534

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Pcap++/src/PcapLiveDevice.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ namespace pcpp
8080
return PCAP_D_OUT;
8181
case PcapLiveDevice::PCPP_INOUT:
8282
return PCAP_D_INOUT;
83+
default:
84+
throw std::invalid_argument("Unknown direction type");
8385
}
8486
}
8587
#endif

0 commit comments

Comments
 (0)