haxe
haxe copied to clipboard
Throw "String" wrapped into haxe.ValueException but native field's type difference
Hej,
With this sample : https://try.haxe.org/#4Aa92c24
class Test {
static function main() {
try {
throw "Foo";
} catch (e) {
trace( Type.typeof( e ) );
trace( e.native );
trace( Type.typeof( e.native ) );
}
}
}
We got these results :
- Haxe 4.3.6
- JS :
- haxe.ValueException
- "Foo"
- haxe.ValueException
- Neko :
- haxe.ValueException
- "Foo"
- String
- Eval :
- haxe.ValueException
- "Foo"
- String
- HL : Build Error
- JS :
- Haxe 4.3.6 - d688fdf74
- JS :
- haxe.ValueException
- "Foo"
- haxe.ValueException
- Neko :
- haxe.ValueException
- "Foo"
- String
- Eval :
- haxe.ValueException
- "Foo"
- String
- HL :
- haxe.ValueException
- "Foo"
- String
- JS :
- Haxe Developpment - 7ba8e17 :
- JS :
- haxe.ValueException
- "Foo"
- haxe.ValueException
- Neko :
- haxe.ValueException
- "Foo"
- haxe.ValueException
- Eval :
- haxe.ValueException
- "Foo"
- haxe.ValueException
- HL :
- haxe.ValueException
- "Foo"
- haxe.ValueException
- JS :
Is it normal that native's type is also haxe.ValueException ? Won't it be like circular refs here or something infinite using previous/native ?
And are these changes planned for the next 4.3.x release please ?
Thanks for reading !