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
8e107626
...
8e107626789de98e791ba5b04f3946e32e6f7578
authored
2012-12-29 11:50:24 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
catch errors thrown in onStepComplete() hook
1 parent
6c72cc1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
modules/casper.js
modules/casper.js
View file @
8e10762
...
...
@@ -1337,13 +1337,13 @@ Casper.prototype.runStep = function runStep(step) {
this
.
emit
(
'step.start'
,
step
);
try
{
stepResult
=
step
.
call
(
this
,
this
.
currentResponse
);
if
(
utils
.
isFunction
(
this
.
options
.
onStepComplete
))
{
this
.
options
.
onStepComplete
.
call
(
this
,
this
,
stepResult
);
}
}
catch
(
err
)
{
this
.
emit
(
'step.error'
,
err
);
throw
err
;
}
if
(
utils
.
isFunction
(
this
.
options
.
onStepComplete
))
{
this
.
options
.
onStepComplete
.
call
(
this
,
this
,
stepResult
);
}
if
(
!
skipLog
)
{
this
.
emit
(
'step.complete'
,
stepResult
);
this
.
log
(
stepInfo
+
f
(
": done in %dms."
,
new
Date
().
getTime
()
-
this
.
startTime
),
"info"
);
...
...
Please
register
or
sign in
to post a comment