diff options
Diffstat (limited to 'crocoite/browser.py')
-rw-r--r-- | crocoite/browser.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crocoite/browser.py b/crocoite/browser.py index ce96f7e..10eaaff 100644 --- a/crocoite/browser.py +++ b/crocoite/browser.py @@ -269,6 +269,9 @@ class VarChangeEvent: await self.event.wait () return self._value +class NavigateError (IOError): + pass + class SiteLoader: """ Load site in Chrome and monitor network requests @@ -364,6 +367,8 @@ class SiteLoader: ret = await self.tab.Page.navigate(url=url) self.logger.debug ('navigate', uuid='9d47ded2-951f-4e09-86ee-fd4151e20666', result=ret) + if 'errorText' in ret: + raise NavigateError (ret['errorText']) # internal chrome callbacks async def _requestWillBeSent (self, **kwargs): |