1
0
Fork 0

fixed assertion error on shutdown

This commit is contained in:
Jan Steemann 2015-04-13 16:24:19 +02:00
parent d7e4c6fd4c
commit 7c393dec44
4 changed files with 18 additions and 9 deletions

View File

@ -1409,15 +1409,15 @@ void ApplicationV8::prepareV8Server (const string& name, const size_t i, const s
// load server startup file
switch (_startupLoader.loadScript(isolate, localContext, startupFile)) {
case JSLoader::eSuccess:
LOG_TRACE("loaded JavaScript file '%s'", startupFile.c_str());
break;
case JSLoader::eFailLoad:
LOG_FATAL_AND_EXIT("cannot load JavaScript utilities from file '%s'", startupFile.c_str());
break;
case JSLoader::eFailExecute:
LOG_FATAL_AND_EXIT("error during execution of JavaScript utilities from file '%s'", startupFile.c_str());
break;
case JSLoader::eSuccess:
LOG_TRACE("loaded JavaScript file '%s'", startupFile.c_str());
break;
case JSLoader::eFailLoad:
LOG_FATAL_AND_EXIT("cannot load JavaScript utilities from file '%s'", startupFile.c_str());
break;
case JSLoader::eFailExecute:
LOG_FATAL_AND_EXIT("error during execution of JavaScript utilities from file '%s'", startupFile.c_str());
break;
}
// and return from the context

View File

@ -55,6 +55,9 @@
console.info("trying to autoload new database %s, ignored", name);
}
}
// return to _system database so the caller does not need to know we changed the db
db._useDatabase("_system");
return true;
}

View File

@ -56,6 +56,9 @@
db._useDatabase("_system");
throw e;
}
// return to _system database so the caller does not need to know we changed the db
db._useDatabase("_system");
}
};
}());

View File

@ -54,6 +54,9 @@
console.info("trying to loading actions of a new database %s, ignored", name);
}
}
// return to _system database so the caller does not need to know we changed the db
db._useDatabase("_system");
return true;
}
};