Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77959239
ModuleError.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Aug 17, 11:56
Size
1 KB
Mime Type
text/x-c++
Expires
Mon, Aug 19, 11:56 (2 d)
Engine
blob
Format
Raw Data
Handle
19956617
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
ModuleError.js
View Options
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict"
;
const
{
cleanUp
}
=
require
(
"./ErrorHelpers"
);
const
WebpackError
=
require
(
"./WebpackError"
);
const
makeSerializable
=
require
(
"./util/makeSerializable"
);
class
ModuleError
extends
WebpackError
{
/**
* @param {Error} err error thrown
* @param {{from?: string|null}} info additional info
*/
constructor
(
err
,
{
from
=
null
}
=
{})
{
let
message
=
"Module Error"
;
if
(
from
)
{
message
+=
`
(
from
$
{
from
})
:
\
n
`
;
}
else
{
message
+=
": "
;
}
if
(
err
&&
typeof
err
===
"object"
&&
err
.
message
)
{
message
+=
err
.
message
;
}
else
if
(
err
)
{
message
+=
err
;
}
super
(
message
);
this
.
name
=
"ModuleError"
;
this
.
error
=
err
;
this
.
details
=
err
&&
typeof
err
===
"object"
&&
err
.
stack
?
cleanUp
(
err
.
stack
,
this
.
message
)
:
undefined
;
Error
.
captureStackTrace
(
this
,
this
.
constructor
);
}
serialize
(
context
)
{
const
{
write
}
=
context
;
write
(
this
.
error
);
super
.
serialize
(
context
);
}
deserialize
(
context
)
{
const
{
read
}
=
context
;
this
.
error
=
read
();
super
.
deserialize
(
context
);
}
}
makeSerializable
(
ModuleError
,
"webpack/lib/ModuleError"
);
module
.
exports
=
ModuleError
;
Event Timeline
Log In to Comment