diff options
Diffstat (limited to 'src/mongo/db/query/sbe_stage_builder_helpers.h')
-rw-r--r-- | src/mongo/db/query/sbe_stage_builder_helpers.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/query/sbe_stage_builder_helpers.h b/src/mongo/db/query/sbe_stage_builder_helpers.h index c5a63a3b002..46f41471ac0 100644 --- a/src/mongo/db/query/sbe_stage_builder_helpers.h +++ b/src/mongo/db/query/sbe_stage_builder_helpers.h @@ -216,6 +216,10 @@ std::unique_ptr<sbe::EExpression> makeVariable(sbe::value::SlotId slotId); std::unique_ptr<sbe::EExpression> makeVariable(sbe::FrameId frameId, sbe::value::SlotId slotId); +inline auto makeFail(int code, StringData errorMessage) { + return sbe::makeE<sbe::EFail>(ErrorCodes::Error{code}, errorMessage); +} + /** * Check if expression returns Nothing and return null if so. Otherwise, return the expression. */ |