From 22c3c3d13f8d2557c4be9c2060bcd8026023ebf8 Mon Sep 17 00:00:00 2001 From: Randolph Tan Date: Fri, 5 Feb 2016 15:17:41 -0500 Subject: Revert "SERVER-22349 Throw exceptions from loadStored" This reverts commit dfc320fe9c8a5227b08c77a87f52996cf40b0206. --- src/mongo/scripting/engine.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp index 8891c19acfa..632957a5d08 100644 --- a/src/mongo/scripting/engine.cpp +++ b/src/mongo/scripting/engine.cpp @@ -226,9 +226,14 @@ void Scope::loadStored(OperationContext* txn, bool ignoreNotConnected) { uassert(10209, str::stream() << "name has to be a string: " << n, n.type() == String); uassert(10210, "value has to be set", v.type() != EOO); - setElement(n.valuestr(), v, o); - thisTime.insert(n.valuestr()); - _storedNames.insert(n.valuestr()); + try { + setElement(n.valuestr(), v, o); + thisTime.insert(n.valuestr()); + _storedNames.insert(n.valuestr()); + } catch (const DBException& setElemEx) { + error() << "unable to load stored JavaScript function " << n.valuestr() + << "(): " << setElemEx.what() << endl; + } } // remove things from scope that were removed from the system.js collection -- cgit v1.2.1