HaxeFoundation / HaxeFoundation/haxe
Throw "String" wrapped into haxe.ValueException but native field's type difference
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Hej,
With this sample : https://try.haxe.org/#4Aa92c24
```haxe
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
- 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
- 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
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 !
Contributor guide
Research direction
Start with the linked try.haxe.org sample and reproduce the reported exception behavior on JS, Neko, Eval, and HashLink. Compare the native and wrapped exception types across those targets, then confirm the intended cross-target behavior and cover the discrepancy with the relevant regression test.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100