From 38c9b1547600eb82b3b214d99b208627992b8987 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Wed, 22 Apr 2015 15:36:09 +0200 Subject: [PATCH] Improve error message --- khal/khalendar/event.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/khal/khalendar/event.py b/khal/khalendar/event.py index 5f29c212f..332b467d8 100644 --- a/khal/khalendar/event.py +++ b/khal/khalendar/event.py @@ -283,8 +283,10 @@ def compact(self, day, timeformat='%H:%M'): else: return self._compact_datetime(day, timeformat) except Exception as e: - raise type(e)('Something went wrong while displaying "{}": {}' - .format(self.href, str(e))) + newarg = ('Something went wrong while displaying "{}"' + .format(self.href),) + e.args = newarg + e.args + raise def _compact_allday(self, day): if self.recur: