Stefan Hett
2014-09-09 10:38:36 UTC
Hi,
we've set-up a script which calls luajit.exe to create precompiled lua
files. In some weird cases we end-up with luajit.exe silently not
writing the output file at all (reason unknown).
I see from the code-base that in case of an error LuaJIT (aka: pmain)
doesn't return any errorcodes at all. I was wondering if it wouldn't be
useful to change that behavior. Shouldn't it be better to return the
status (s->status) as the error code, if it was set instead of 0? Or
alternatively: In those cases where the status is != 0, change the
return value to a fixed (non-null) return value to indicate some error?
Regards,
Stefan
we've set-up a script which calls luajit.exe to create precompiled lua
files. In some weird cases we end-up with luajit.exe silently not
writing the output file at all (reason unknown).
I see from the code-base that in case of an error LuaJIT (aka: pmain)
doesn't return any errorcodes at all. I was wondering if it wouldn't be
useful to change that behavior. Shouldn't it be better to return the
status (s->status) as the error code, if it was set instead of 0? Or
alternatively: In those cases where the status is != 0, change the
return value to a fixed (non-null) return value to indicate some error?
Regards,
Stefan