summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands.cpp')
-rw-r--r--src/mongo/db/commands.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp
index 646578c855d..8c75b5cfaa8 100644
--- a/src/mongo/db/commands.cpp
+++ b/src/mongo/db/commands.cpp
@@ -168,7 +168,7 @@ BSONObj CommandHelpers::runCommandDirectly(OperationContext* opCtx, const OpMsgR
invocation->run(opCtx, &replyBuilder);
auto body = replyBuilder.getBodyBuilder();
CommandHelpers::extractOrAppendOk(body);
- } catch (const ExceptionFor<ErrorCodes::StaleConfig>&) {
+ } catch (const StaleConfigException&) {
// These exceptions are intended to be handled at a higher level.
throw;
} catch (const DBException& ex) {
@@ -205,6 +205,7 @@ void CommandHelpers::runCommandInvocation(OperationContext* opCtx,
CommandInvocation* invocation,
rpc::ReplyBuilderInterface* response) {
auto&& hooks = getCommandInvocationHooks(opCtx->getServiceContext());
+
if (hooks) {
hooks->onBeforeRun(opCtx, request, invocation);
}