mirror of https://gitee.com/bigwinds/arangodb
better error handling
This commit is contained in:
parent
9705bd97b0
commit
4d9d4abbb4
|
@ -903,11 +903,15 @@ int main (int argc, char* argv[]) {
|
||||||
StartupLoader.defineScript("client/client.js", JS_client_client);
|
StartupLoader.defineScript("client/client.js", JS_client_client);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
LOGGER_DEBUG << "using JavaScript startup files at '" << StartupPath << "'";
|
LOGGER_DEBUG << "using JavaScript startup files at '" << StartupPath << "'";
|
||||||
=======
|
=======
|
||||||
LOGGER_INFO << "using JavaScript startup files at '" << StartupPath << "'";
|
LOGGER_INFO << "using JavaScript startup files at '" << StartupPath << "'";
|
||||||
>>>>>>> JS loader for avocsh
|
>>>>>>> JS loader for avocsh
|
||||||
|
=======
|
||||||
|
LOGGER_DEBUG << "using JavaScript startup files at '" << StartupPath << "'";
|
||||||
|
>>>>>>> better error handling
|
||||||
StartupLoader.setDirectory(StartupPath);
|
StartupLoader.setDirectory(StartupPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -934,11 +938,7 @@ int main (int argc, char* argv[]) {
|
||||||
RunShell(context);
|
RunShell(context);
|
||||||
=======
|
=======
|
||||||
|
|
||||||
RunMain(context, argc, argv);
|
RunShell(context);
|
||||||
|
|
||||||
if (RunShellFlag) {
|
|
||||||
RunShell(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> JS loader for avocsh
|
>>>>>>> JS loader for avocsh
|
||||||
}
|
}
|
||||||
|
|
|
@ -926,6 +926,7 @@ AvocadoDatabase.prototype._help = function () {
|
||||||
print(helpAvocadoDatabase);
|
print(helpAvocadoDatabase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief return a string representation of the database object
|
/// @brief return a string representation of the database object
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1127,3 +1128,22 @@ catch (err) {
|
||||||
// mode: outline-minor
|
// mode: outline-minor
|
||||||
// outline-regexp: "^\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @}\\)"
|
// outline-regexp: "^\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @}\\)"
|
||||||
// End:
|
// End:
|
||||||
|
=======
|
||||||
|
try {
|
||||||
|
|
||||||
|
//
|
||||||
|
// default database
|
||||||
|
//
|
||||||
|
db = new AvocadoDatabase(avocado);
|
||||||
|
|
||||||
|
//
|
||||||
|
// load collection data
|
||||||
|
//
|
||||||
|
db._collections();
|
||||||
|
|
||||||
|
help();
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
print(COLOR_RED + "connection failure: " + err + COLOR_BLACK);
|
||||||
|
}
|
||||||
|
>>>>>>> better error handling
|
||||||
|
|
|
@ -1416,17 +1416,26 @@ static string JS_client_client =
|
||||||
"// End:\n"
|
"// End:\n"
|
||||||
=======
|
=======
|
||||||
"\n"
|
"\n"
|
||||||
"//\n"
|
"try {\n"
|
||||||
"// default database\n"
|
|
||||||
"// \n"
|
|
||||||
"db = new AvocadoDatabase(avocado);\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"//\n"
|
" //\n"
|
||||||
"// load collection data\n"
|
" // default database\n"
|
||||||
"// \n"
|
" // \n"
|
||||||
|
" db = new AvocadoDatabase(avocado);\n"
|
||||||
"\n"
|
"\n"
|
||||||
"db._collections();\n"
|
" //\n"
|
||||||
|
" // load collection data\n"
|
||||||
|
" // \n"
|
||||||
|
" db._collections();\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
<<<<<<< HEAD
|
||||||
"help();\n"
|
"help();\n"
|
||||||
>>>>>>> JS loader for avocsh
|
>>>>>>> JS loader for avocsh
|
||||||
|
=======
|
||||||
|
" help();\n"
|
||||||
|
"}\n"
|
||||||
|
"catch (err) {\n"
|
||||||
|
" print(COLOR_RED + \"connection failure: \" + err + COLOR_BLACK);\n"
|
||||||
|
"}\n"
|
||||||
|
>>>>>>> better error handling
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in New Issue