Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
throw browser error code
Browse files Browse the repository at this point in the history
  • Loading branch information
cnishina committed Dec 18, 2018
1 parent e658d6d commit 3916ffe
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 37 deletions.
6 changes: 4 additions & 2 deletions lib/driverProviders/driverProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
*/
import {Builder, WebDriver} from 'selenium-webdriver';

import {BrowserError} from '../exitCodes';
import {Logger} from '../logger';
import {BlockingProxyRunner} from '../bpRunner';
import {Config} from '../config';

let logger = new Logger('driverProvider');
export abstract class DriverProvider {
drivers_: WebDriver[];
config_: Config;
Expand Down Expand Up @@ -60,8 +63,7 @@ export abstract class DriverProvider {
try {
newDriver = await builder.build();
} catch (e) {
e.code = 135;
throw e;
throw new BrowserError(logger, (e as Error).message);
}
this.drivers_.push(newDriver);
return newDriver;
Expand Down
56 changes: 21 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3916ffe

Please sign in to comment.