Skip to content

Commit

Permalink
Restore full uri in error message. Closes #2246
Browse files Browse the repository at this point in the history
  • Loading branch information
Eran Hammer committed Dec 3, 2014
1 parent 30df1bc commit e94816d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/plugin.js
Expand Up @@ -226,7 +226,7 @@ internals.Plugin.prototype.register = function (plugins /*, [options], callback

for (var i = 0, il = selection.connections.length; i < il; ++i) {
var connection = selection.connections[i];
Hoek.assert(item.multiple || !connection._registrations[item.name], 'Plugin', item.name, 'already registered in:', connection.info.host + ':' + connection.settings.port);
Hoek.assert(item.multiple || !connection._registrations[item.name], 'Plugin', item.name, 'already registered in:', connection.info.uri);
connection._registrations[item.name] = item;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/server.js
Expand Up @@ -138,7 +138,7 @@ internals.Server.prototype.start = function (callback) {
var connection = dependency.connections[s];
for (var d = 0, dl = dependency.deps.length; d < dl; ++d) {
var dep = dependency.deps[d];
Hoek.assert(connection._registrations[dep], 'Plugin', dependency.plugin, 'missing dependency', dep, 'in connection:', connection.info.host + ':' + connection.settings.port);
Hoek.assert(connection._registrations[dep], 'Plugin', dependency.plugin, 'missing dependency', dep, 'in connection:', connection.info.uri);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions test/plugin.js
Expand Up @@ -321,7 +321,7 @@ describe('Plugin', function () {
expect(function () {

server.register(test, function (err) { });
}).to.throw('Plugin test already registered in: example.com:0');
}).to.throw('Plugin test already registered in: http://example.com');

done();
});
Expand Down Expand Up @@ -1214,7 +1214,7 @@ describe('Plugin', function () {
expect(function () {

server.start();
}).to.throw('Plugin test missing dependency none in connection: ' + Os.hostname() + ':0');
}).to.throw('Plugin test missing dependency none in connection: ' + server.info.uri);
done();
});
});
Expand All @@ -1228,7 +1228,7 @@ describe('Plugin', function () {
expect(function () {

server.start();
}).to.throw('Plugin deps1 missing dependency deps2 in connection: localhost:80');
}).to.throw('Plugin deps1 missing dependency deps2 in connection: http://localhost:80');
done();
});
});
Expand Down Expand Up @@ -1300,7 +1300,7 @@ describe('Plugin', function () {
expect(function () {

server.start();
}).to.throw('Plugin b missing dependency c in connection: localhost:80');
}).to.throw('Plugin b missing dependency c in connection: http://localhost:80');
done();
});
});
Expand Down

0 comments on commit e94816d

Please sign in to comment.