UnsubscriptionError.js 1.0 KB

12345678910111213141516171819202122232425
  1. "use strict";
  2. var __extends = (this && this.__extends) || function (d, b) {
  3. for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  4. function __() { this.constructor = d; }
  5. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  6. };
  7. /**
  8. * An error thrown when one or more errors have occurred during the
  9. * `unsubscribe` of a {@link Subscription}.
  10. */
  11. var UnsubscriptionError = (function (_super) {
  12. __extends(UnsubscriptionError, _super);
  13. function UnsubscriptionError(errors) {
  14. _super.call(this);
  15. this.errors = errors;
  16. var err = Error.call(this, errors ?
  17. errors.length + " errors occurred during unsubscription:\n " + errors.map(function (err, i) { return ((i + 1) + ") " + err.toString()); }).join('\n ') : '');
  18. this.name = err.name = 'UnsubscriptionError';
  19. this.stack = err.stack;
  20. this.message = err.message;
  21. }
  22. return UnsubscriptionError;
  23. }(Error));
  24. exports.UnsubscriptionError = UnsubscriptionError;
  25. //# sourceMappingURL=UnsubscriptionError.js.map