mirror of https://gitee.com/bigwinds/arangodb
Fixed Foxx installer errors.
This commit is contained in:
parent
19b14bd98c
commit
4f51343100
|
@ -63,8 +63,12 @@ describe("Foxx Manager install", function() {
|
|||
}
|
||||
validateError = function(type, error) {
|
||||
expect(error instanceof ArangoError).toBeTruthy();
|
||||
expect(error.errorNum).toEqual(type.code, "Invalid code returned: expected " + type.code + " got "
|
||||
+ error.errorNum + " Message: " + String(error) + " Trace: " + error.stack);
|
||||
expect(error.errorNum).toEqual(
|
||||
type.code,
|
||||
"Invalid code returned: expected " + type.code + " got " + error.errorNum
|
||||
+ " Message: " + error
|
||||
+ " Trace: " + error.stack
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -950,6 +950,7 @@ var _install = function(appInfo, mount, options, runSetup) {
|
|||
try {
|
||||
fs.removeDirectoryRecursive(targetPath, true);
|
||||
} catch (err) {
|
||||
console.errorLines(err.stack);
|
||||
}
|
||||
try {
|
||||
if (!options.__clusterDistribution) {
|
||||
|
@ -964,6 +965,21 @@ var _install = function(appInfo, mount, options, runSetup) {
|
|||
});
|
||||
}
|
||||
} catch (err) {
|
||||
console.errorLines(err.stack);
|
||||
}
|
||||
if (e instanceof ArangoError) {
|
||||
if (e.errorNum === errors.ERROR_MODULE_SYNTAX_ERROR.code) {
|
||||
throw _.extend(new ArangoError({
|
||||
errorNum: errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.code,
|
||||
errorMessage: errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.message
|
||||
}), {stack: e.stack});
|
||||
}
|
||||
if (e.errorNum === errors.ERROR_MODULE_FAILURE.code) {
|
||||
throw _.extend(new ArangoError({
|
||||
errorNum: errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.code,
|
||||
errorMessage: errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.message
|
||||
}), {stack: e.stack});
|
||||
}
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue