flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
18
BACK_BACK/node_modules/parcel-bundler/lib/utils/customErrors.js
generated
vendored
Executable file
18
BACK_BACK/node_modules/parcel-bundler/lib/utils/customErrors.js
generated
vendored
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
"use strict";
|
||||
|
||||
const serverErrorList = {
|
||||
EACCES: "You don't have access to bind the server to port {port}.",
|
||||
EADDRINUSE: 'There is already a process listening on port {port}.'
|
||||
};
|
||||
|
||||
function serverErrors(err, port) {
|
||||
let desc = `Error: ${err.code} occurred while setting up server on port ${port}.`;
|
||||
|
||||
if (serverErrorList[err.code]) {
|
||||
desc = serverErrorList[err.code].replace(/{port}/g, port);
|
||||
}
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
||||
module.exports.serverErrors = serverErrors;
|
||||
Loading…
Add table
Add a link
Reference in a new issue