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:
terrarier2111 2021-05-06 11:28:00 +02:00 committed by GitHub
parent 84356bbeb0
commit 2bcd03f788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");
}
}