dabo Commit
Revision 3638
Date: 2007-11-07 14:21:13 -0800 (Wed, 07 Nov 2007)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/3638
Changed:
U trunk/dabo/dException.py
U trunk/dabo/ui/uiwx/dFont.py
Log:
Changed dFont to not print the information to the log when a font substitution
has occurred, and to raise an exception if the passed font name doesn't exist
on the system and a valid substitution couldn't be found.
Diff:
Modified: trunk/dabo/dException.py
===================================================================
--- trunk/dabo/dException.py 2007-11-07 22:00:02 UTC (rev 3637)
+++ trunk/dabo/dException.py 2007-11-07 22:21:13 UTC (rev 3638)
@@ -3,6 +3,12 @@
""" Base class in the framework for passing exceptions."""
+class FontException(dException):
+ pass
+
+class FontNotFoundException(FontException):
+ pass
+
class BeginningOfFileException(dException):
pass
Modified: trunk/dabo/ui/uiwx/dFont.py
===================================================================
--- trunk/dabo/ui/uiwx/dFont.py 2007-11-07 22:00:02 UTC (rev 3637)
+++ trunk/dabo/ui/uiwx/dFont.py 2007-11-07 22:21:13 UTC (rev 3638)
@@ -79,12 +79,8 @@
automatic_face = trial
break
- if automatic_face:
- dabo.infoLog.write(_("The font '%s' doesn't
exist on the system. Used '%s' instead.")
- % (val, automatic_face))
- else:
- dabo.errorLog.write(_("The font '%s' doesn't
exist on the system.")
- % val)
+ if not automatic_face:
+ raise dabo.dException.FontNotFoundException,
_("The font '%s' doesn't exist on this system.") % val
self._propsChanged()
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]