Fix app crash when payload is too large
Summary: Fixes T40544233 Exceptions should be thrown by value, not as a pointer, or else catching by reference (the recommended practice) won't work. Reviewed By: priteshrnandgaonkar Differential Revision: D14243337 fbshipit-source-id: 28677d7f1b3c025b67fb945f30116f3b751a89a8
This commit is contained in:
committed by
Facebook Github Bot
parent
0445a05e5b
commit
56576a84ce
@@ -357,7 +357,7 @@ rsocket::Payload toRSocketPayload(dynamic data) {
|
||||
json.substr(0, 100) + "...";
|
||||
log(logMessage);
|
||||
DCHECK_LE(payloadLength, maxPayloadSize);
|
||||
throw new std::length_error(logMessage);
|
||||
throw std::length_error(logMessage);
|
||||
}
|
||||
|
||||
return payload;
|
||||
|
||||
Reference in New Issue
Block a user