mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
微调
This commit is contained in:
parent
1e311e778c
commit
5090fd5c0b
@ -274,6 +274,7 @@ def raise_error(r):
|
|||||||
elif error in ('Node does not have a layout object', 'Could not compute box model.'):
|
elif error in ('Node does not have a layout object', 'Could not compute box model.'):
|
||||||
raise NoRectError
|
raise NoRectError
|
||||||
elif r['type'] == 'call_method_error':
|
elif r['type'] == 'call_method_error':
|
||||||
raise CDPError(f'\n错误:{r["error"]}\nmethod:{r["method"]}\nargs:{r["args"]}')
|
raise CDPError(f'\n错误:{r["error"]}\nmethod:{r["method"]}\nargs:{r["args"]}\n出现这个错误可能意味着程序有bug,'
|
||||||
|
'请把错误信息和重现方法告知作者,谢谢。\n报告网站:https://gitee.com/g1879/DrissionPage/issues')
|
||||||
else:
|
else:
|
||||||
raise RuntimeError(r)
|
raise RuntimeError(r)
|
||||||
|
@ -38,7 +38,7 @@ class ContextLostError(BaseError):
|
|||||||
|
|
||||||
|
|
||||||
class ElementLostError(BaseError):
|
class ElementLostError(BaseError):
|
||||||
_info = '元素对象因刷新已失效。'
|
_info = '元素对象已失效。可能是页面整体刷新,或js局部刷新把元素替换或去除了。'
|
||||||
|
|
||||||
|
|
||||||
class CDPError(BaseError):
|
class CDPError(BaseError):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user