advice user when an unknown command is typed in the console

This commit is contained in:
Iuri Matias 2017-02-15 20:24:42 -05:00
parent a511979cd1
commit bd99a75048
1 changed files with 5 additions and 1 deletions

View File

@ -36,7 +36,11 @@ Console.prototype.executeCmd = function(cmd, callback) {
return callback(result); return callback(result);
} }
catch(e) { catch(e) {
return callback(e.message.red); if (e.message.indexOf('not defined') > 0) {
return callback(("error: " + e.message).red + ("\nType " + "help".bold + " to see the list of available commands").cyan);
} else {
return callback(e.message);
}
} }
}; };