From 0af000e49da829afc304fb70dba4d3783a7a2dcb Mon Sep 17 00:00:00 2001 From: Louis Date: Sun, 27 Dec 2015 02:57:39 +0100 Subject: [PATCH] More verbose exception --- patacrep/latex/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/patacrep/latex/__init__.py b/patacrep/latex/__init__.py index 83d12906..1f48a0e4 100644 --- a/patacrep/latex/__init__.py +++ b/patacrep/latex/__init__.py @@ -87,6 +87,9 @@ class UnknownLanguage(Exception): self.fallback = fallback self.message = message + def __str__(self): + return self.message + def checklanguage(lang): """Check that `lang` is a known language.