mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Better error reporting for executing modules on the server
This commit is contained in:
parent
92353d37b2
commit
a9f34b8b00
@ -623,7 +623,11 @@ $tw.modules.execute = function(moduleName,moduleRoot) {
|
||||
$tw.modules.titles[name] = module;
|
||||
// Execute it to get its exports if we haven't already done so
|
||||
if(!module.exports) {
|
||||
vm.runInNewContext(tiddler.fields.text,sandbox,tiddler.fields.title);
|
||||
try {
|
||||
vm.runInNewContext(tiddler.fields.text,sandbox,tiddler.fields.title);
|
||||
} catch(e) {
|
||||
throw "Error executing boot module " + tiddler.fields.title + ":\n" + e;
|
||||
}
|
||||
module.exports = sandbox.exports;
|
||||
}
|
||||
// Return the exports of the module
|
||||
|
Loading…
Reference in New Issue
Block a user