Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
38c19678
...
38c196780bff7c4a895af90d3d3900b319a41831
authored
2011-09-14 16:33:17 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added a 'message' arg to Casper.options#onDie callback
1 parent
51b41755
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
casper.js
casper.js
View file @
38c1967
...
...
@@ -217,10 +217,11 @@
*/
die
:
function
(
message
,
status
)
{
this
.
result
.
status
=
'error'
;
this
.
result
.
time
=
new
Date
().
getTime
()
-
this
.
startTime
;
message
=
typeof
(
message
)
===
"string"
&&
message
.
length
>
0
?
message
:
DEFAULT_DIE_MESSAGE
;
this
.
log
(
message
,
"error"
);
if
(
typeof
(
this
.
options
.
onDie
)
===
"function"
)
{
this
.
options
.
onDie
(
this
,
status
);
this
.
options
.
onDie
(
this
,
message
,
status
);
}
return
this
.
exit
(
Number
(
status
)
>
0
?
Number
(
status
)
:
1
);
},
...
...
Please
register
or
sign in
to post a comment