From ab755348711dfb94fa0780c5aa71a8e6e614d132 Mon Sep 17 00:00:00 2001 From: Dimitar Krastev Date: Wed, 25 Dec 2024 03:39:16 +0200 Subject: [PATCH] Added exception when an unknown direction is supplied. (#1666) --- Pcap++/src/PcapLiveDevice.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Pcap++/src/PcapLiveDevice.cpp b/Pcap++/src/PcapLiveDevice.cpp index 6eef2111d2..831db83502 100644 --- a/Pcap++/src/PcapLiveDevice.cpp +++ b/Pcap++/src/PcapLiveDevice.cpp @@ -80,6 +80,8 @@ namespace pcpp return PCAP_D_OUT; case PcapLiveDevice::PCPP_INOUT: return PCAP_D_INOUT; + default: + throw std::invalid_argument("Unknown direction type"); } } #endif