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
711d654d
...
711d654d9e87fc2adbf8ca275add47364647f751
authored
2012-01-09 16:54:16 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
better display of uncaught CasperError errors
1 parent
f5d21fc3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
bin/bootstrap.js
modules/tester.js
bin/bootstrap.js
View file @
711d654
...
...
@@ -150,7 +150,7 @@ if (!phantom.casperLoaded) {
}
}
// trick to locate source file location on error
scriptCode
+=
";var __fe__ = new Error('__sourceId__')"
;
scriptCode
+=
";var __fe__ = new
Casper
Error('__sourceId__')"
;
scriptCode
+=
";__fe__.fileName = '"
+
file
+
"'"
;
scriptCode
+=
";throw __fe__;"
;
return
scriptCode
;
...
...
@@ -166,7 +166,7 @@ if (!phantom.casperLoaded) {
if
(
typeof
callback
===
"function"
)
{
callback
(
error
,
file
);
}
else
{
console
.
error
(
this
.
getErrorMessage
(
error
)
);
console
.
error
(
error
.
stack
);
this
.
exit
(
1
);
}
};
...
...
modules/tester.js
View file @
711d654
...
...
@@ -320,7 +320,7 @@ var Tester = function(casper, options) {
phantom
.
processScriptError
(
e
,
file
,
function
(
error
)
{
// do not abort the whole suite, just fail fast displaying the
// caught error and process next suite
self
.
fail
(
phantom
.
getErrorMessage
(
e
)
);
self
.
fail
(
e
);
self
.
done
();
});
}
...
...
Please
register
or
sign in
to post a comment