Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91574306
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
Tue, Nov 12, 08:29
Size
1 KB
Mime Type
text/x-c++
Expires
Thu, Nov 14, 08:29 (2 d)
Engine
blob
Format
Raw Data
Handle
22285649
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