void Command::generateErrorResponse(OperationContext* txn, rpc::ReplyBuilderInterface* replyBuilder, const DBException& exception, const rpc::RequestInterface& request) { LOG(1) << "assertion while executing command '" << request.getCommandName() << "' " << "on database '" << request.getDatabase() << "': " << exception.toString(); _generateErrorResponse(txn, replyBuilder, exception, rpc::makeEmptyMetadata()); }
void Command::generateErrorResponse(OperationContext* txn, rpc::ReplyBuilderInterface* replyBuilder, const DBException& exception, const rpc::RequestInterface& request, Command* command, const BSONObj& metadata) { LOG(1) << "assertion while executing command '" << request.getCommandName() << "' " << "on database '" << request.getDatabase() << "' " << "with arguments '" << command->getRedactedCopyForLogging(request.getCommandArgs()) << "' " << "and metadata '" << request.getMetadata() << "': " << exception.toString(); _generateErrorResponse(txn, replyBuilder, exception, metadata); }
std::string causedBy(const DBException& e) { return causedBy(e.toString()); }
void Command::generateErrorResponse(OperationContext* txn, rpc::ReplyBuilderInterface* replyBuilder, const DBException& exception) { LOG(1) << "assertion while executing command: " << exception.toString(); _generateErrorResponse(txn, replyBuilder, exception, rpc::makeEmptyMetadata()); }