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
5b1eea97
...
5b1eea97852890ce75ce968e67caa985875642c4
authored
2012-06-26 21:14:13 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
refs #159 - better error message in case getGlobal() failed
1 parent
7145ddd7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
modules/casper.js
modules/casper.js
View file @
5b1eea9
...
...
@@ -733,7 +733,9 @@ Casper.prototype.getGlobal = function getGlobal(name) {
}
return
result
;
},
{
'name'
:
name
});
if
(
'error'
in
result
)
{
if
(
typeof
result
!==
"object"
)
{
throw
new
CasperError
(
f
(
'Could not retrieve global value for "%s"'
,
name
));
}
else
if
(
'error'
in
result
)
{
throw
new
CasperError
(
result
.
error
);
}
else
if
(
utils
.
isString
(
result
.
value
))
{
return
JSON
.
parse
(
result
.
value
);
...
...
Please
register
or
sign in
to post a comment