Skip to content

Commit

Permalink
expections added.
Browse files Browse the repository at this point in the history
  • Loading branch information
yakupadakli committed May 26, 2018
1 parent 5089e22 commit 2f91577
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions musixmatch/expections.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import six


class MusixmatchException(Exception):
"""Musixmatch exception"""

def __init__(self, message=None, **kwargs):
self.message = six.text_type(message) if message else "Unknown error"
super(MusixmatchException, self).__init__(message, **kwargs)

def __str__(self):
return self.message


class NotFound(MusixmatchException):
message = six.text_type("Not Found")

0 comments on commit 2f91577

Please sign in to comment.