main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
697 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | import AxiosError from '../core/AxiosError.js';
|
---|
4 | import utils from '../utils.js';
|
---|
5 |
|
---|
6 | /**
|
---|
7 | * A `CanceledError` is an object that is thrown when an operation is canceled.
|
---|
8 | *
|
---|
9 | * @param {string=} message The message.
|
---|
10 | * @param {Object=} config The config.
|
---|
11 | * @param {Object=} request The request.
|
---|
12 | *
|
---|
13 | * @returns {CanceledError} The created error.
|
---|
14 | */
|
---|
15 | function CanceledError(message, config, request) {
|
---|
16 | // eslint-disable-next-line no-eq-null,eqeqeq
|
---|
17 | AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
|
---|
18 | this.name = 'CanceledError';
|
---|
19 | }
|
---|
20 |
|
---|
21 | utils.inherits(CanceledError, AxiosError, {
|
---|
22 | __CANCEL__: true
|
---|
23 | });
|
---|
24 |
|
---|
25 | export default CanceledError;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.