Skip to content

Commit bc7e3a1

Browse files
thalissonvs3-Tokisaki-Kurumi
authored andcommitted
feat: add new script-related exception classes for better handling
1 parent 1d9d00a commit bc7e3a1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pydoll/exceptions.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,15 @@ class NetworkEventsNotEnabled(PydollException):
239239
"""Raised when network events are not enabled."""
240240

241241
message = 'Network events not enabled'
242+
243+
244+
class ScriptException(PydollException):
245+
"""Base class for exceptions related to JavaScript execution."""
246+
247+
message = 'A script execution error occurred'
248+
249+
250+
class InvalidScriptWithElement(ScriptException):
251+
"""Raised when a script contains 'argument' but no element is provided."""
252+
253+
message = 'Script contains "argument" but no element was provided'

0 commit comments

Comments
 (0)