hscript
hscript copied to clipboard
Haxe4 try-catch
I think it would be a good idea to add some changes to try-catch from Haxe 4 versions, such as wildcard catch and multiple catch
(multiple catch)
try {}
catch (v:A) {}
catch (v:B) {}
catch(e:haxe.Exception) {}
Will it be dangerous to change ETry for such changes?
from:
ETry( e : Expr, v : String, t : Null<CType>, ecatch : Expr );
to:
ETry( e : Expr, catchList:Array<{ v : String, t : Null<CType>, ecatch : Expr }> );
The only possible problem in the hscript.Bytes encoding that should be adapted to support for older try-catches binaries, so that both old and new data are supported.
Along with #145, I would give a different index to the new try catch