Skip to content

Commit

Permalink
Set specific error code for message too big error
Browse files Browse the repository at this point in the history
CURA-11103
  • Loading branch information
wawanbreton committed Sep 23, 2024
1 parent a0b95fd commit 0e24426
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion conandata.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: "5.4.0-alpha.0"
version: "5.4.1"
1 change: 1 addition & 0 deletions include/Arcus/Error.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ enum class ErrorCode
BindFailedError, ///< Bind to IP and port failed.
AcceptFailedError, ///< Accepting an incoming connection failed.
SendFailedError, ///< Sending a message failed.
MessageTooBigError, ///< Sending a message failed because it was too big.
ReceiveFailedError, ///< Receiving a message failed.
UnknownMessageTypeError, ///< Received a message with an unknown message type.
ParseFailedError, ///< Parsing the received message failed.
Expand Down
2 changes: 1 addition & 1 deletion src/Socket_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void Socket::Private::sendMessage(const MessagePtr& message)
const uint32_t message_size = message->ByteSizeLong();
if (message_size > message_size_maximum)
{
error(ErrorCode::SendFailedError, "Message is too big to be sent");
error(ErrorCode::MessageTooBigError, "Message is too big to be sent");
return;
}

Expand Down

0 comments on commit 0e24426

Please sign in to comment.