tsbase
Version:
Base class libraries for TypeScript
23 lines • 698 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Command = void 0;
const Result_1 = require("../Result/Result");
const module_1 = require("../../Utility/Logger/module");
class Command {
constructor(Command) {
this.Command = Command;
}
Execute() {
const result = new Result_1.Result(null);
try {
this.Command();
}
catch (error) {
result.ErrorMessages.push(error.message);
module_1.Logger.Instance.Log(new module_1.LogEntry(error.message, module_1.LogLevel.Error, error));
}
return result;
}
}
exports.Command = Command;
//# sourceMappingURL=Command.js.map