Is there a "standard" way of translating back and forth between native and java errors/throwables? It is unclear to me where this would belong. i.e. here or Elemental2 or maybe tucked away in the JRE emulation layer.
At the moment in our GWT code I am doing the equivalent of JsError error = Js.uncheckedCast(Js.asPropertyMap( e ).nestedGet( "backingJsObject" )) but this feels like it is prone to breakage when moving to J2cl where backingJsObject is potentially renamed.
Is there a location where this could be added that would be accepted?
Throwable class has a getBackingJsObject() method to get the js errors. If you want to get back to java throwable from js error, us Throwable.of(backingJsObject)
Is there a "standard" way of translating back and forth between native and java errors/throwables? It is unclear to me where this would belong. i.e. here or Elemental2 or maybe tucked away in the JRE emulation layer.
At the moment in our GWT code I am doing the equivalent of
JsError error = Js.uncheckedCast(Js.asPropertyMap( e ).nestedGet( "backingJsObject" ))
but this feels like it is prone to breakage when moving to J2cl wherebackingJsObject
is potentially renamed.Is there a location where this could be added that would be accepted?