# -*- coding: utf-8 -*-

# Copyright (c) 2013, Theo Crevon
# Copyright (c) 2013, Greg Leclercq
#
# See the file LICENSE for copying permission.


class PollTimeout(Exception):
    pass


class InvalidCredentialsError(Exception):
    pass


class ResponseError(Exception):
    pass


class DoesNotExistError(Exception):
    pass


class AlreadyExistsError(Exception):
    pass


class InvalidKeywordArgumentError(Exception):
    pass

@@ -142,36 +142,581 @@
 n.%0A%0A
-%0Aclass PollTimeout(Exception
+class SWFError(Exception):%0A    def __init__(self, message, raw_error, *args):%0A        Exception.__init__(self, message, *args)%0A        self.kind, self.details = raw_error.split(':')%0A%0A    def __repr__(self):%0A        msg = self.message%0A%0A        if self.kind and self.details:%0A            msg += '%5CnReason: %7B%7D, %7B%7D'.format(self.kind, self.details)%0A%0A        return msg%0A%0A    def __str__(self):%0A        msg = self.message%0A%0A        if self.kind and self.details:%0A            msg += '%5CnReason: %7B%7D, %7B%7D'.format(self.kind, self.details)%0A%0A        return msg%0A%0A%0Aclass PollTimeout(SWFError
 ):%0A 
@@ -751,33 +751,32 @@
 ntialsError(
-Exception
+SWFError
 ):%0A    pass%0A
@@ -793,33 +793,32 @@
 sponseError(
-Exception
+SWFError
 ):%0A    pass%0A
@@ -839,33 +839,32 @@
 tExistError(
-Exception
+SWFError
 ):%0A    pass%0A
@@ -886,33 +886,32 @@
 ExistsError(
-Exception
+SWFError
 ):%0A    pass%0A
@@ -942,33 +942,32 @@
 gumentError(
-Exception
+SWFError
 ):%0A    pass%0A

Enhance swf errors wrapping via an exception helper