![](https://secure.gravatar.com/avatar/62c54476729274ddfefd6b1f53e311dc.jpg?s=120&d=mm&r=g)
Hi, if I understand things right, this code will not reach the second line. local ret = tex.sp("1cow") print(type(ret)) Instead, TeX stops (at least in my source code, I could have done something wrong) with "Illegal unit of measure (pt inserted)". Would it be possible to have some nicer error handling? For example to return [ nil, "Illegal unit of measure (pt inserted)"] ? Patrick
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
On 10/11/2010 02:39 PM, Patrick Gundlach wrote:
Hi,
if I understand things right, this code will not reach the second line.
local ret = tex.sp("1cow") print(type(ret))
Correct.
Instead, TeX stops (at least in my source code, I could have done something wrong) with "Illegal unit of measure (pt inserted)". Would it be possible to have some nicer error handling? For example to return [ nil, "Illegal unit of measure (pt inserted)"] ?
Make a tracker item for it, and I will implement that. No time now, but it pretty simple. Best wishes, Taco
participants (2)
-
Patrick Gundlach
-
Taco Hoekwater