UNPKG

970 BJavaScriptView Raw
1/*
2 Copyright © 2018 Andrew Powell
3
4 This Source Code Form is subject to the terms of the Mozilla Public
5 License, v. 2.0. If a copy of the MPL was not distributed with this
6 file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8 The above copyright notice and this permission notice shall be
9 included in all copies or substantial portions of this Source Code Form.
10*/
11class WebpackPluginServeError extends Error {
12 constructor(...args) {
13 super(...args);
14 this.name = 'WebpackPluginServeError';
15 }
16}
17
18class PluginExistsError extends WebpackPluginServeError {
19 constructor(...args) {
20 super(...args);
21 this.name = 'PluginExistsError';
22 this.code = 'ERR_PLUGIN_EXISTS';
23 }
24}
25
26class RamdiskPathError extends WebpackPluginServeError {
27 constructor(...args) {
28 super(...args);
29 this.name = 'RamdiskPathError';
30 this.code = 'ERR_RAMDISK_PATH';
31 }
32}
33
34module.exports = { PluginExistsError, RamdiskPathError, WebpackPluginServeError };