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
743d44b7a2
commit
fe5a56fc01
@ -64,11 +64,11 @@ public enum MqttVersion {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (mv == null) {
|
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)) {
|
if (mv.name.equals(protocolName)) {
|
||||||
return mv;
|
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