@@ -116,7 +116,8 @@ var makeFunction = function (sock, addr, port, pass, funcName, func) {
var arg = arguments[i];
if (!args[i].required && (arg === null || arg === undefined)) { continue; }
if (!compatibleType(args[i].type, arg)) {
- throw new Error("argument [" + i + "] [" + args[i].type + " " + args[i].name + "]" +
+ throw new Error("argument [" + i + "] ([" + arguments[i] + "]) [" +
+ args[i].type + " " + args[i].name + "]" +
" is of type [" + typeof(arg) + "] which is not compatible with " +
"required type " + args[i].type);
}
@@ -57,7 +57,11 @@ nThen(function (waitFor) {
if (i < handles.length) { next(i); }
}));
};
- next(0);
+ if (handles.length) {
+ next(0);
+ } else {
+ console.log("No active sessions");
+ }
}).nThen(function (waitFor) {
cjdns.disconnect();