[JW Lua] ExecuteLuaScriptItem: returning an error message
Robert Patterson
robert at robertgpatterson.com
Mon Dec 19 17:48:30 CET 2022
Another option would be simply to return the error message when there's an
error. Then you could distinguish between your error messages and Lua
runtime error messages. (Because the success boolean would be true but
there would also be a message.)
On Mon, Dec 19, 2022 at 9:50 AM Jan Angermüller <jan at angermueller.com>
wrote:
> Robert et al,
>
> finenv.ExecuteLuaScriptItem can return up to three values.
>
> But how can I force a script to return a certain error?
> I thought that a simpe "return false" or "return true" at the end of the
> executed script could influence one of the three values.
> But that didn't work. I always get the return values "true","nil","nil".
>
> It's more that I only want to return a true or false - there is no real
> error.
>
> Any ideas?
>
> Tested with v0.65 on Windows/Finale 27.
>
> Jan
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20221219/d8d7e8e0/attachment.htm>
More information about the JWLua
mailing list