Skip to content

Commit 0e24426

Browse files
committed
Set specific error code for message too big error
CURA-11103
1 parent a0b95fd commit 0e24426

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

conandata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: "5.4.0-alpha.0"
1+
version: "5.4.1"

include/Arcus/Error.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ enum class ErrorCode
1919
BindFailedError, ///< Bind to IP and port failed.
2020
AcceptFailedError, ///< Accepting an incoming connection failed.
2121
SendFailedError, ///< Sending a message failed.
22+
MessageTooBigError, ///< Sending a message failed because it was too big.
2223
ReceiveFailedError, ///< Receiving a message failed.
2324
UnknownMessageTypeError, ///< Received a message with an unknown message type.
2425
ParseFailedError, ///< Parsing the received message failed.

src/Socket_p.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ void Socket::Private::sendMessage(const MessagePtr& message)
341341
const uint32_t message_size = message->ByteSizeLong();
342342
if (message_size > message_size_maximum)
343343
{
344-
error(ErrorCode::SendFailedError, "Message is too big to be sent");
344+
error(ErrorCode::MessageTooBigError, "Message is too big to be sent");
345345
return;
346346
}
347347

0 commit comments

Comments
 (0)