From 86dddd81c7c4de4fb55b633062ca2541dcb0de6d Mon Sep 17 00:00:00 2001 From: Christian Kratky Date: Sat, 6 May 2017 12:15:14 +0200 Subject: [PATCH] Extend invalid protocol exception message --- MQTTnet.Core/Serializer/DefaultMqttV311PacketSerializer.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MQTTnet.Core/Serializer/DefaultMqttV311PacketSerializer.cs b/MQTTnet.Core/Serializer/DefaultMqttV311PacketSerializer.cs index 61c6c8e..76071cf 100644 --- a/MQTTnet.Core/Serializer/DefaultMqttV311PacketSerializer.cs +++ b/MQTTnet.Core/Serializer/DefaultMqttV311PacketSerializer.cs @@ -1,7 +1,6 @@ using System; using System.Linq; using System.Text; -using System.Text.RegularExpressions; using System.Threading.Tasks; using MQTTnet.Core.Channel; using MQTTnet.Core.Exceptions; @@ -201,7 +200,7 @@ namespace MQTTnet.Core.Serializer default: { - throw new MqttProtocolViolationException("Packet type not supported."); + throw new MqttProtocolViolationException($"Packet type ({(int)mqttPacketReader.ControlPacketType}) not supported."); } } }