Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function Address(data, network, type) {
return data;
}

$.checkArgument(data, new TypeError('First argument is required, please include address data.'));
$.checkArgument(data, 'First argument is required, please include address data.', 'guide/address.html');

if (network && !Networks.get(network)) {
throw new TypeError('Second argument must be "livenet" or "testnet".');
Expand Down
5 changes: 4 additions & 1 deletion lib/errors/spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

var docsURL = 'http://bitcore.io/';

module.exports = [{
name: 'InvalidB58Char',
message: 'Invalid Base58 character: {0} in {1}'
Expand All @@ -21,7 +23,8 @@ module.exports = [{
}, {
name: 'InvalidArgument',
message: function() {
return 'Invalid Argument' + (arguments[0] ? (': ' + arguments[0]) : '');
return 'Invalid Argument' + (arguments[0] ? (': ' + arguments[0]) : '') +
(arguments[1] ? (' Documentation: ' + docsURL + arguments[1]): '');
}
}, {
name: 'AbstractMethodInvoked',
Expand Down
4 changes: 2 additions & 2 deletions lib/util/preconditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ module.exports = {
throw new errors.InvalidState(message);
}
},
checkArgument: function(condition, argumentName, message) {
checkArgument: function(condition, argumentName, message, docsPath) {
if (!condition) {
throw new errors.InvalidArgument(argumentName, message);
throw new errors.InvalidArgument(argumentName, message, docsPath);
}
},
checkArgumentType: function(argument, type, argumentName) {
Expand Down