Skip to content

Commit 966d045

Browse files
terrarier2111夏无影
authored andcommitted
Improved exception messages in MqttVersion (netty#11228)
Motivation: When checking the latest commit i saw some bad exception messages in MqttVersion hence i improved them. Modification: Improved exception messages in MqttVersion. Result: Better exception messages in MqttVersion.
1 parent eeb0eba commit 966d045

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttVersion.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ public static MqttVersion fromProtocolNameAndLevel(String protocolName, byte pro
6363
break;
6464
}
6565
if (mv == null) {
66-
throw new MqttUnacceptableProtocolVersionException(protocolName + "is unknown protocol name");
66+
throw new MqttUnacceptableProtocolVersionException(protocolName + " is an unknown protocol name");
6767
}
6868
if (mv.name.equals(protocolName)) {
6969
return mv;
7070
}
71-
throw new MqttUnacceptableProtocolVersionException(protocolName + " and " + protocolLevel + " are not match");
71+
throw new MqttUnacceptableProtocolVersionException(protocolName + " and " + protocolLevel + " don't match");
7272
}
7373
}

0 commit comments

Comments
 (0)