I recently enhanced my display function - that turns an object into a string.
After sending it to RUNIE for testing he complained that his script breaks when he uses it on a specific object.
After some debugging I found out that AHK_H exits when I use a for loop on a Thread Object, more specifically when using a for-loop to access the .ahkgetvar field of the thread.
This is the code that makes AHK_H crash:

Well I can't add exceptions for each and every type of object that doesn't support _NewEnum.
In my opinion every object should support _NewEnum - it's a standard action that every object should support, at least every built in object.

No, I mean ahk should throw, not you. I guess in v1 it should silently fail instead . V2 throws when trying to call non existent methods, just as v1 throws on non existent functions. Not having newenum is the more usual case

First, I see I misread your previous post, you didn't suggest you would throw any exceptions, sorry.

In AHK_L:

Indeed I meant in AHK_L, I don't know about all objects in AHK_H. And yeah, most instances probably has _newenum. In addition to your list, RegExMatch objects, doesn't have _newenum.

Finally, it seems that v2 also silently fails when trying to use a for loop with an object which doesn't support it, I think that is a mistake, it should be handled with try if desired, otherwise it should be assumed to be a mistake, and one should be notified. For example, funcObj._newEnum() causes an exception, but not for k in funcObj. Note, should refers only to my opinion, it is debatable of course.

That should be fixed now.
When calling a DynaCall object you can specify a different return type then previously defined, e.g. Thread.ahkgetvar.ptr("var"), now calling Thread.ahkgetvar._NewEnum() or for loop will result in error.