source: frontend/node_modules/webpack/lib/errors/UnhandledSchemeError.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Ivan Kopeykin @vankop
4*/
5
6"use strict";
7
8const makeSerializable = require("../util/makeSerializable");
9const WebpackError = require("./WebpackError");
10
11/**
12 * Error raised when webpack encounters a resource URI scheme that no installed
13 * plugin knows how to read.
14 */
15class UnhandledSchemeError extends WebpackError {
16 /**
17 * Creates an error explaining that the current resource scheme is not
18 * supported by the active plugin set.
19 * @param {string} scheme scheme
20 * @param {string} resource resource
21 */
22 constructor(scheme, resource) {
23 super(
24 `Reading from "${resource}" is not handled by plugins (Unhandled scheme).` +
25 '\nWebpack supports "data:" and "file:" URIs by default.' +
26 `\nYou may need an additional plugin to handle "${scheme}:" URIs.`
27 );
28 this.file = resource;
29 /** @type {string} */
30 this.name = "UnhandledSchemeError";
31 }
32}
33
34makeSerializable(
35 UnhandledSchemeError,
36 "webpack/lib/errors/UnhandledSchemeError",
37 "UnhandledSchemeError"
38);
39
40module.exports = UnhandledSchemeError;
Note: See TracBrowser for help on using the repository browser.