 {
            return this._reportOnFailure;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ReportingChannel.prototype, "timeout", {
        get: function () {
            return this._timeout;
        },
        enumerable: true,
        configurable: true
    });
    ReportingChannel.prototype.registerListeners = function (reporter) {
    };
    ;
    return ReportingChannel;
}());
exports.ReportingChannel = ReportingChannel;
var ConsoleReporter = (function (_super) {
    __extends(ConsoleReporter, _super);
    function ConsoleReporter() {
        _super.call(this);
    }
    ConsoleReporter.prototype.report = function (error) {
        return new Promise(function (resolve, reject) {
            if (error.rawError.stack.length > 2000) {
                var shortened = error.rawError.stack.substr(0, 1000);
                shortened += "\n...shortened to avoid blocking while printing...\n" +
                    "...see other reporting methods for full stack...\n";
                shortened += error.rawError.stack.substring(error.rawError.stack.length - 1000);
                console.log(shortened);
            }
            else {
                console.log(error.rawError.stack);
            }
            console.log();
            resolve();
        });
    };
    return ConsoleReporter;
}(ReportingChannel));
exports.ConsoleReporter = ConsoleReporter;
var FileReporter = (function (_super) {
    __extends(FileReporter, _super);
    function FileReporter(filePath, fileName, stripStack) {
        _super.call(this);
        this.fileName = fileName;
        this.filePath = filePath;
        this.stripStack = stripStack;
    }
    FileReporter.prototype.report = function (error) {
        var _this = this;
        return new Promise(function (resolve, reject) {
            var fullPath = path.join(_this.filePath, _this.fileName);
            var content;
            if (_this.stripStack) {
                content = error.errorName + advanced_1.WATSON_LINE_BREAK;
                content += error.errorMessage + advanced_1.WATSON_LINE_BREAK;
                content += error.getVerboseStack() + advanced_1.WATSON_LINE_BREAK + advanced_1.WATSON_LINE_BREAK;
            }
            else {
                content = error.rawError.stack + "\n";
            }
            fs.appendFile(fullPath, content, {}, function (err) { if (err) {
                reject(err.stack);
            }
            else {
                resolve(fullPath);
            } });
        });
    };
    return FileReporter;
}(ReportingChannel));
exports.FileReporter = FileReporter;
