You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
385 B

4 years ago
  1. 'use strict';
  2. /**
  3. * A `Cancel` is an object that is thrown when an operation is canceled.
  4. *
  5. * @class
  6. * @param {string=} message The message.
  7. */
  8. function Cancel(message) {
  9. this.message = message;
  10. }
  11. Cancel.prototype.toString = function toString() {
  12. return 'Cancel' + (this.message ? ': ' + this.message : '');
  13. };
  14. Cancel.prototype.__CANCEL__ = true;
  15. module.exports = Cancel;