|
@@ -517,6 +517,15 @@ and expr dce e =
|
|
|
expr dce e;
|
|
|
| TThrow e ->
|
|
|
check_and_add_feature dce "has_throw";
|
|
|
+ (*
|
|
|
+ TODO: Simon, save me! \o
|
|
|
+ This is a hack needed to keep toString field of the actual exception objects
|
|
|
+ that are thrown, but are wrapped into HaxeError before DCE comes into play.
|
|
|
+ *)
|
|
|
+ let e = (match e.eexpr with
|
|
|
+ | TNew({cl_path=(["js";"_Boot"],"HaxeError")}, _, [eoriginal]) -> eoriginal
|
|
|
+ | _ -> e
|
|
|
+ ) in
|
|
|
to_string dce e.etype;
|
|
|
expr dce e
|
|
|
| _ ->
|