summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mongo/scripting/engine.cpp11
1 files 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