mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
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:
parent
b0e5a50a59
commit
7283842b3a
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue