Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
container-manager
Commits
40738b38
Commit
40738b38
authored
Oct 24, 2018
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
make errors stringifiable
parent
06a29331
Changes
1
Hide whitespace changes
Inline
Side-by-side
app.js
View file @
40738b38
// make Errors stringifyable....
if
(
!
(
'
toJSON
'
in
Error
.
prototype
))
Object
.
defineProperty
(
Error
.
prototype
,
'
toJSON
'
,
{
value
:
function
()
{
var
alt
=
{};
Object
.
getOwnPropertyNames
(
this
).
forEach
(
function
(
key
)
{
alt
[
key
]
=
this
[
key
];
},
this
);
return
alt
;
},
configurable
:
true
,
writable
:
true
});
function
main
()
{
var
iarg
=
2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment