Improved exception messages in MqttVersion (#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.
This commit is contained in:
parent
84356bbeb0
commit
2bcd03f788
@ -63,11 +63,11 @@ public enum MqttVersion {
|
||||
break;
|
||||
}
|
||||
if (mv == null) {
|
||||
throw new MqttUnacceptableProtocolVersionException(protocolName + "is unknown protocol name");
|
||||
throw new MqttUnacceptableProtocolVersionException(protocolName + " is an unknown protocol name");
|
||||
}
|
||||
if (mv.name.equals(protocolName)) {
|
||||
return mv;
|
||||
}
|
||||
throw new MqttUnacceptableProtocolVersionException(protocolName + " and " + protocolLevel + " are not match");
|
||||
throw new MqttUnacceptableProtocolVersionException(protocolName + " and " + protocolLevel + " don't match");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user