Raise Exception instead of returning None.

This commit is contained in:
Hermann Kraus 2012-09-15 02:06:08 +02:00 committed by Dane Springmeyer
parent 29a0d6133b
commit 924f3fb19c

View file

@ -703,8 +703,8 @@ class _TextSymbolizer(TextSymbolizer,_injector):
if isinstance(self.properties.format_tree, FormattingText):
return self.properties.format_tree.text
else:
return None # This text symbolizer is using complex formatting features.
# There is no single expression which could be returned as name
# There is no single expression which could be returned as name
raise RuntimeError("TextSymbolizer uses complex formatting features, but old compatibility interface is used to access it. Use self.properties.format_tree instead.")
@name.setter
def name(self, name):