Provide more information on PageUnloadable

pull/1238/head
dgtlmoon 2 years ago
parent b7a2501d64
commit efafc9bef8

@ -42,7 +42,7 @@ class BrowserStepsStepTimout(Exception):
class PageUnloadable(Exception): class PageUnloadable(Exception):
def __init__(self, status_code, url, screenshot=False, message=False): def __init__(self, status_code, url, message, screenshot=False):
# Set this so we can use it in other parts of the app # Set this so we can use it in other parts of the app
self.status_code = status_code self.status_code = status_code
self.url = url self.url = url
@ -332,7 +332,7 @@ class base_html_playwright(Fetcher):
print (str(e)) print (str(e))
context.close() context.close()
browser.close() browser.close()
raise PageUnloadable(url=url, status_code=None) raise PageUnloadable(url=url, status_code=None, message=str(e))
if response is None: if response is None:

Loading…
Cancel
Save