Skip to content

Commit 2d51477

Browse files
author
brentru
committed
add a mqtterror class
1 parent 3b5d0a2 commit 2d51477

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

adafruit_io/adafruit_io_errors.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,8 @@ def __init__(self, response):
3939
error = response_content['error']
4040
super(AdafruitIO_RequestError, self).__init__("Adafruit IO Error {0}: {1}"
4141
.format(response.status_code, error))
42+
43+
class AdafruitIO_MQTTError(Exception):
44+
"""Adafruit IO MQTT error class"""
45+
def __init__(self, response):
46+
super(AdafruitIO_ThrottleError, self).__init__('Adafruit IO MQTT Error: {0}'.format(response))

0 commit comments

Comments
 (0)