GameCTO / luainterface

Automatically exported from code.google.com/p/luainterface
0 stars 0 forks source link

DoString() is better to have an overload with the chunkName parameter #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current DoString() use the parameter source code string as both source
string and chunkName, which cause the chunkName to be very long and
useless. It is bette to add an overload with a chunkName parameter, so that
the error info thrown out from lua has meaningful chunkName which can help
debugging.

Original issue reported on code.google.com by qingrui...@gmail.com on 20 Nov 2008 at 2:09

GoogleCodeExporter commented 9 years ago
Im not sure I follow here...are you referring to the DoString in Lua.cs 
public object[] DoString(string chunk)?

Can you give a little more info please?

Original comment by capre...@gmail.com on 23 Dec 2008 at 11:23

GoogleCodeExporter commented 9 years ago
Yes, that's what I mean.

When lua throws an error, it provides the location in [chunkName:lineNumber] 
format,
and it helps to debug lua script. But if the script is run by DoString(), there 
will
be no meaningful chunkName. In some cases, I'd like to pass a name instead of 
the
default behavior.

Original comment by qingrui...@gmail.com on 26 Dec 2008 at 11:08

GoogleCodeExporter commented 9 years ago
Implemented in r6

Original comment by capre...@gmail.com on 8 Mar 2009 at 9:59

GoogleCodeExporter commented 9 years ago

Original comment by capre...@gmail.com on 8 Mar 2009 at 10:00