# HG changeset patch # User phoku@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1237142089 0 # Node ID 40257a6dc57dd0d91e9f7d84211dd9ad6c5462d5 # Parent 6214a0b91eb2349ef0464a23e4e82d67780d23a7 PyChan: Meaningful error if a font wasn't loaded. diff -r 6214a0b91eb2 -r 40257a6dc57d engine/extensions/pychan/internal.py --- a/engine/extensions/pychan/internal.py Sat Mar 14 12:32:11 2009 +0000 +++ b/engine/extensions/pychan/internal.py Sun Mar 15 18:34:49 2009 +0000 @@ -1,4 +1,4 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- from compat import guichan, in_fife import widgets @@ -91,7 +91,7 @@ return font if hasattr(font,"font") and isinstance(getattr(font,"font"),guichan.GuiFont): return font.font - return fonts.parseFontSpec(name) + raise InitializationError("Couldn't find the font '%s' - did you forget loading a .fontdef?" % str(name)) else: return self.hook.get_font(name)