fix(module): info about missing exchange module added

This commit is contained in:
Damian Mee 2014-08-05 00:20:35 +02:00
parent bcf565e158
commit c2bfa215c0

View file

@ -21,7 +21,12 @@ var Trader = module.exports = function (db) {
}; };
Trader.prototype._findExchange = function (name) { Trader.prototype._findExchange = function (name) {
return require('lamassu-' + name); try {
return require('lamassu-' + name);
} catch(_) {
throw new Error(name + ' module is not installed. Try running `npm install --save lamassu-' + name + '` first');
}
}; };
Trader.prototype._findTicker = function (name) { Trader.prototype._findTicker = function (name) {