mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-15 07:36:18 +00:00
20 lines
385 B
JavaScript
20 lines
385 B
JavaScript
|
'use strict';
|
||
|
|
||
|
/**
|
||
|
* A `Cancel` is an object that is thrown when an operation is canceled.
|
||
|
*
|
||
|
* @class
|
||
|
* @param {string=} message The message.
|
||
|
*/
|
||
|
function Cancel(message) {
|
||
|
this.message = message;
|
||
|
}
|
||
|
|
||
|
Cancel.prototype.toString = function toString() {
|
||
|
return 'Cancel' + (this.message ? ': ' + this.message : '');
|
||
|
};
|
||
|
|
||
|
Cancel.prototype.__CANCEL__ = true;
|
||
|
|
||
|
module.exports = Cancel;
|