Added more information to MQQT exception
This commit is contained in:
parent
26acf56f09
commit
f31f850644
1 changed files with 3 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 Ziver Koc
|
* Copyright (c) 2020-2025 Ziver Koc
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
@ -49,7 +49,7 @@ import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO:
|
* This class implements a MQTT Broker. Where arbitrary data can be published by clients and received by subscribers.
|
||||||
*
|
*
|
||||||
* @see <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html">MQTT v3.1.1 Spec</a>
|
* @see <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html">MQTT v3.1.1 Spec</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -504,7 +504,7 @@ public class MqttBroker extends ThreadedTCPNetworkServer {
|
||||||
|
|
||||||
private void handlePublish(MqttPacketPublish publishPacket) {
|
private void handlePublish(MqttPacketPublish publishPacket) {
|
||||||
if (publishPacket.getFlagQoS() != 0)
|
if (publishPacket.getFlagQoS() != 0)
|
||||||
throw new UnsupportedOperationException("QoS larger then 0 not supported.");
|
throw new UnsupportedOperationException("QoS larger then 0 not supported (value: " + publishPacket.getFlagQoS() + ").");
|
||||||
if (publishPacket.getFlagQoS() >= 3)
|
if (publishPacket.getFlagQoS() >= 3)
|
||||||
throw new IllegalArgumentException("QoS value of 3 is not valid.");
|
throw new IllegalArgumentException("QoS value of 3 is not valid.");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue