admin管理员组文章数量:1026989
I get error code #1 when rendering some web pages but not others in phantomJS. The block is in a 3rd party module that calls phantomJS to take the screenshot.
if (path) {
phantomProc.on('exit', function(code) {
if (!calledCallback) {
calledCallback = true;
// No need to run the timeout anymore.
clearTimeout(timeoutID);
cb(code
? new Error('PhantomJS exited with return value ' + code)
: null);
}
});
What is error code 1? I can't find any reference to phantomJS error codes online.
I get error code #1 when rendering some web pages but not others in phantomJS. The block is in a 3rd party module that calls phantomJS to take the screenshot.
if (path) {
phantomProc.on('exit', function(code) {
if (!calledCallback) {
calledCallback = true;
// No need to run the timeout anymore.
clearTimeout(timeoutID);
cb(code
? new Error('PhantomJS exited with return value ' + code)
: null);
}
});
What is error code 1? I can't find any reference to phantomJS error codes online.
Share Improve this question asked Nov 15, 2013 at 15:05 metalaureatemetalaureate 7,74211 gold badges59 silver badges97 bronze badges 2- ` var phantomProc = childProcess.spawn(options.phantomPath, phantomArgs);` It's just a call to the phantomjs child process. – metalaureate Commented Nov 15, 2013 at 15:13
- It could be Invalid Function. – Anto Jurković Commented Nov 15, 2013 at 15:26
1 Answer
Reset to default 4code
is the return code the script execution.
This is generally manage inside the client script, by calling phantom.exit(code)
.
The convention on phantomjs examples, is to use 1
for invalid parameters.
For example, check the loadspeed.js
if (system.args.length === 1) {
console.log('Usage: loadspeed.js <some URL>');
phantom.exit(1);
} else {
...
}
I get error code #1 when rendering some web pages but not others in phantomJS. The block is in a 3rd party module that calls phantomJS to take the screenshot.
if (path) {
phantomProc.on('exit', function(code) {
if (!calledCallback) {
calledCallback = true;
// No need to run the timeout anymore.
clearTimeout(timeoutID);
cb(code
? new Error('PhantomJS exited with return value ' + code)
: null);
}
});
What is error code 1? I can't find any reference to phantomJS error codes online.
I get error code #1 when rendering some web pages but not others in phantomJS. The block is in a 3rd party module that calls phantomJS to take the screenshot.
if (path) {
phantomProc.on('exit', function(code) {
if (!calledCallback) {
calledCallback = true;
// No need to run the timeout anymore.
clearTimeout(timeoutID);
cb(code
? new Error('PhantomJS exited with return value ' + code)
: null);
}
});
What is error code 1? I can't find any reference to phantomJS error codes online.
Share Improve this question asked Nov 15, 2013 at 15:05 metalaureatemetalaureate 7,74211 gold badges59 silver badges97 bronze badges 2- ` var phantomProc = childProcess.spawn(options.phantomPath, phantomArgs);` It's just a call to the phantomjs child process. – metalaureate Commented Nov 15, 2013 at 15:13
- It could be Invalid Function. – Anto Jurković Commented Nov 15, 2013 at 15:26
1 Answer
Reset to default 4code
is the return code the script execution.
This is generally manage inside the client script, by calling phantom.exit(code)
.
The convention on phantomjs examples, is to use 1
for invalid parameters.
For example, check the loadspeed.js
if (system.args.length === 1) {
console.log('Usage: loadspeed.js <some URL>');
phantom.exit(1);
} else {
...
}
本文标签: javascriptWhat is phantom JS error code 1Stack Overflow
版权声明:本文标题:javascript - What is phantom JS error code 1? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745608581a2158872.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论