From 08f32d0ea1dfceb466c0d7990944523f1c253d16 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 15 Jun 2016 19:46:36 +0300 Subject: move API wrappers to a package --- vk/error.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 vk/error.py (limited to 'vk/error.py') 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 +# 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 -- cgit v1.2.3