chore: improve error message (#2222)

This commit is contained in:
Yury Semikhatsky 2020-05-13 15:57:26 -07:00 committed by GitHub
parent d611ca9278
commit e081ba7256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,7 +172,7 @@ export abstract class BrowserContextBase extends ExtendedEventEmitter implements
await pages[0].waitForLoadState();
if (pages.length !== 1 || pages[0].url() !== 'about:blank') {
await this.close().catch(e => null);
throw new Error('Arguments can not specify page to be opened');
throw new Error(`Arguments can not specify page to be opened (first url is ${pages[0].url()})`);
}
}
}