This commit is contained in:
Peter Cottle 2012-09-10 13:24:53 -07:00
parent 3d1890bb3b
commit a4169dc016
4 changed files with 64 additions and 22 deletions

View file

@ -2,18 +2,18 @@ function CommandProcessError(msg) {
this.msg = msg;
}
CommandProcessError.prototype = _.copy(Error.prototype);
CommandProcessError.prototype.toString = function() {
return 'Command Process Error: ' + this.msg;
};
CommandProcessError.prototype.toResult = function() {
return this.msg.replace('\n', '</br>');
};
function CommandResult(msg) {
this.msg = msg;
}
CommandResult.prototype = _.copy(Error.prototype);
CommandResult.prototype.toString = function() {
return 'Command Result: ' + this.msg;
};