replace lua error

error may cause c stack overflow
https://github.com/aarzilli/golua/issues/24