Redefining api_check to throw harmful?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Redefining api_check to throw harmful?

Eric Scouten
We are, for obvious reasons, not enamored of functions that call abort (), so we are considering redefining the api_check macro in Lightroom's build of Lua to throw instead of assert (which ultimately leads to abort).

In our initial testing, we've not found any bad side effects caused by this redefinition. Is anyone here aware of hidden consequences that we might not have discovered?

-Eric


Reply | Threaded
Open this post in threaded view
|

Re: Redefining api_check to throw harmful?

Roberto Ierusalimschy
> In our initial testing, we've not found any bad side effects caused  
> by this redefinition. Is anyone here aware of hidden consequences  
> that we might not have discovered?

As far as I can see, it is safe. But beware that this can change in the
future.

-- Roberto