summaryrefslogtreecommitdiffstats
path: root/testenv/exc/server_error.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 17:47:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 17:47:50 +0000
commitbbe35a6e1b54ef5cd7c1c471886c30ba85c0804e (patch)
tree985a31e8c860c690d9f20e6621ce5fcc05ccd244 /testenv/exc/server_error.py
parentInitial commit. (diff)
downloadwget-upstream.tar.xz
wget-upstream.zip
Adding upstream version 1.21.upstream/1.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testenv/exc/server_error.py')
-rw-r--r--testenv/exc/server_error.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/testenv/exc/server_error.py b/testenv/exc/server_error.py
new file mode 100644
index 0000000..fe359f5
--- /dev/null
+++ b/testenv/exc/server_error.py
@@ -0,0 +1,19 @@
+
+class ServerError (Exception):
+ """ A custom exception which is raised by the test servers. Often used to
+ handle control flow. """
+
+ def __init__(self, err_message):
+ self.err_message = err_message
+
+class NoBodyServerError (Exception):
+ """ A custom exception which is raised by the test servers.
+ Used if no body should be sent in response. """
+
+ def __init__(self, err_message):
+ self.err_message = err_message
+
+class AuthError (ServerError):
+ """ A custom exception raised byt he servers when authentication of the
+ request fails. """
+ pass