mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Fail with a more informative error message if the browser executable path doesn't exist
This commit is contained in:
parent
63aaf1b969
commit
fbae39983c
1 changed files with 4 additions and 0 deletions
|
@ -145,6 +145,10 @@ ChromiumBrowser.prototype.buildArguments = function (url) {
|
|||
|
||||
WebBrowser.create = function (desc) {
|
||||
var name = desc.name;
|
||||
|
||||
// Throws an exception if the path doesn't exist.
|
||||
fs.statSync(desc.path);
|
||||
|
||||
if (/firefox/i.test(name)) {
|
||||
return new FirefoxBrowser(desc.name, desc.path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue