diff options
Diffstat (limited to 'src/mongo/rpc/get_status_from_command_result.h')
-rw-r--r-- | src/mongo/rpc/get_status_from_command_result.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mongo/rpc/get_status_from_command_result.h b/src/mongo/rpc/get_status_from_command_result.h index 6c930ccd017..e1477436e55 100644 --- a/src/mongo/rpc/get_status_from_command_result.h +++ b/src/mongo/rpc/get_status_from_command_result.h @@ -29,20 +29,20 @@ #pragma once namespace mongo { - class BSONObj; - class Status; +class BSONObj; +class Status; - /** - * Converts "result" into a Status object. The input is expected to be the object returned - * by running a command. Returns ErrorCodes::CommandResultSchemaViolation if "result" does - * not look like the result of a command. - * - * Command results must have a field called "ok" whose value may be interpreted as a boolean. - * If the value interpreted as a boolean is true, the resultant status is Status::OK(). - * Otherwise, it is an error status. The code comes from the "code" field, if present and - * number-ish, while the reason message will come from the errmsg field, if present and - * string-ish. - */ - Status getStatusFromCommandResult(const BSONObj& result); +/** + * Converts "result" into a Status object. The input is expected to be the object returned + * by running a command. Returns ErrorCodes::CommandResultSchemaViolation if "result" does + * not look like the result of a command. + * + * Command results must have a field called "ok" whose value may be interpreted as a boolean. + * If the value interpreted as a boolean is true, the resultant status is Status::OK(). + * Otherwise, it is an error status. The code comes from the "code" field, if present and + * number-ish, while the reason message will come from the errmsg field, if present and + * string-ish. + */ +Status getStatusFromCommandResult(const BSONObj& result); } // namespace mongo |