aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/vk/error.py
diff options
context:
space:
mode:
Diffstat (limited to 'vk/error.py')
-rw-r--r--vk/error.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/vk/error.py b/vk/error.py
new file mode 100644
index 0000000..b80db4e
--- /dev/null
+++ b/vk/error.py
@@ -0,0 +1,16 @@
+# Copyright 2016 Egor Tensin <Egor.Tensin@gmail.com>
+# This file is licensed under the terms of the MIT License.
+# See LICENSE.txt for details.
+
+class APIError(RuntimeError):
+ pass
+
+class InvalidResponseError(APIError):
+ def __init__(self, response):
+ self.response = response
+
+ def __str__(self):
+ return str(self.response)
+
+class ConnectionError(APIError):
+ pass