aboutsummaryrefslogtreecommitdiffstats
path: root/qtip/base
diff options
context:
space:
mode:
authorTaseer <taseer94@gmail.com>2017-04-11 21:39:18 +0500
committerTaseer <taseer94@gmail.com>2017-04-13 11:55:43 +0500
commitb694a4a2d4719169ccc7fb3696367bca7118b513 (patch)
tree69c45568078b9ade485b9ff0b28e0ceec80a75c0 /qtip/base
parenta4878f6c98855f5392324e0e72df3e2711022dd9 (diff)
User friendly messages for exceptions
- Use colorama for color - Implement verbosity option in separate patch Change-Id: Ib2491d867e9bbf59cb00874d99a11f86ad7eea1b Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
Diffstat (limited to 'qtip/base')
-rw-r--r--qtip/base/error.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/qtip/base/error.py b/qtip/base/error.py
index f23d8cd9..d4b516ac 100644
--- a/qtip/base/error.py
+++ b/qtip/base/error.py
@@ -16,12 +16,14 @@ class InvalidContentError(BaseError):
def __init__(self, filename, excinfo=None):
self.filename = filename
self.excinfo = excinfo
+ self.message = "Invalid content in {0}".format(filename)
class NotFoundError(BaseError):
def __init__(self, needle, heystack='qtip'):
self.needle = needle
self.heystack = heystack
+ self.message = "{0} not found in {1}".format(needle[0:-5], heystack)
class ToBeDoneError(BaseError):