Updated clients to have a more robust error handling

- fire text and omg much more similar. Ready to be combined.
- Error handling now for JSON valid responses
This commit is contained in:
Martyn Inglis
2016-09-22 17:18:05 +01:00
parent 37a2dc7925
commit 376f8355cb
7 changed files with 146 additions and 80 deletions

View File

@@ -1,11 +1,16 @@
from app.clients import (Client, ClientException)
class SmsClientException(ClientException):
class SmsClientResponseException(ClientException):
'''
Base Exception for SmsClients
Base Exception for SmsClientsResponses
'''
pass
def __init__(self, message):
self.message = message
def __str__(self):
return "Message {}".format(self.message)
class SmsClient(Client):