Make an error message more explicit.
Resolving some constant function calls may generate tabs, e.g. llUnescapeURL("%09"). That can't be pasted into a script, and a warning is emitted. The warning text was misleading, making one think that something went wrong when all that happened is that an optimization couldn't be applied. Rewrite the text of the warning to be clearer about what the problem is.
This commit is contained in:
@@ -945,7 +945,7 @@ class foldconst(object):
|
||||
else:
|
||||
value = fn(*tuple(arg['value'] for arg in child))
|
||||
if not self.foldtabs and isinstance(value, unicode) and '\t' in value:
|
||||
warning('Tab in function result and foldtabs option not used.')
|
||||
warning("Can't optimize call to %s because it would generate a tab character (you can force the optimization with the foldtabs option)." % node['name'])
|
||||
return
|
||||
parent[index] = {'nt':'CONST', 't':node['t'], 'value':value}
|
||||
except lslfuncs.ELSLCantCompute:
|
||||
|
||||
Reference in New Issue
Block a user