diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-06-15 19:46:36 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-06-15 19:46:36 +0300 |
commit | 08f32d0ea1dfceb466c0d7990944523f1c253d16 (patch) | |
tree | 1bc5b078d2724dd34d2c9f97b9a7f9abc2af04fd /vk/error.py | |
parent | api.ConnectionError -> api.APIConnectionError (diff) | |
download | vk-scripts-08f32d0ea1dfceb466c0d7990944523f1c253d16.tar.gz vk-scripts-08f32d0ea1dfceb466c0d7990944523f1c253d16.zip |
move API wrappers to a package
Diffstat (limited to 'vk/error.py')
-rw-r--r-- | vk/error.py | 16 |
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 |