earlect
Version:
Leader Election Generic Implementation for TypeScript
12 lines (11 loc) • 505 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
class CommunicationMediumError extends Error {
constructor(message, rootCause) {
super(message); // 'Error' breaks prototype chain here
Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain
this.name = CommunicationMediumError.name; // stack traces display correctly now
this.rootCause = rootCause;
}
}
exports.CommunicationMediumError = CommunicationMediumError;