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