Skip to content

Commit bb508a5

Browse files
author
Clem Dal Palu
committed
Printing the body of an SException to help debug issues
1 parent 51d7343 commit bb508a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

BedrockCore.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,10 @@ BedrockCore::RESULT BedrockCore::processCommand(unique_ptr<BedrockCommand>& comm
295295
}
296296

297297
void BedrockCore::_handleCommandException(unique_ptr<BedrockCommand>& command, const SException& e) {
298-
const string& msg = "Error processing command '" + command->request.methodLine + "' (" + e.what() + "), ignoring.";
298+
string msg = "Error processing command '" + command->request.methodLine + "' (" + e.what() + "), ignoring.";
299+
if (!e.body.empty()) {
300+
msg = msg + " Request body: " + e.body;
301+
}
299302
if (SContains(e.what(), "_ALERT_")) {
300303
SALERT(msg);
301304
} else if (SContains(e.what(), "_WARN_")) {

0 commit comments

Comments
 (0)