mirror of https://gitee.com/bigwinds/arangodb
raise error if a broken URL was specified during creating the example.
This commit is contained in:
parent
dc1910e331
commit
ab0c69df30
|
@ -156,6 +156,12 @@ var log = function (a) {
|
|||
|
||||
var logCurlRequestRaw = internal.appendCurlRequest(appender);
|
||||
var logCurlRequest = function () {
|
||||
if ((arguments.length > 1) &&
|
||||
(arguments[1] !== undefined) &&
|
||||
(arguments[1].length > 0) &&
|
||||
(arguments[1][0] !== '/')) {
|
||||
throw new Error("your URL doesn't start with a /! the example will be broken. [" + arguments[1] + "]")
|
||||
}
|
||||
var r = logCurlRequestRaw.apply(logCurlRequestRaw, arguments);
|
||||
db._collections();
|
||||
return r;
|
||||
|
|
Loading…
Reference in New Issue