Note: This should be done in the Java.Interop repo, and then we should ditch Android.Runtime.JavaProxyThrowable in favor of Java.Interop.JavaProxyThrowable.
Related: Issue #1188.
It appears that JavaProxyThrowable doesn't integrate well with Java: if Java code calls Throwable.printStackTrace(), it might not also print -- or might truncate -- the output of Throwable.getMessage(), and Throwable.getMessage() is where JavaProxyThrowable squirrels away the "originating" System.Exception stack trace.
We should update JavaProxyThrowable so that it uses Throwable.setStackTrace() to merge or replace the System.Exception stack frames in with the Throwable stack frames.
I believe that this will in turn improve integration with e.g. HockeyApp and other apps which utilize Throwable.printStackTrace().
Note: This should be done in the Java.Interop repo, and then we should ditch
Android.Runtime.JavaProxyThrowablein favor ofJava.Interop.JavaProxyThrowable.Related: Issue #1188.
It appears that
JavaProxyThrowabledoesn't integrate well with Java: if Java code callsThrowable.printStackTrace(), it might not also print -- or might truncate -- the output ofThrowable.getMessage(), andThrowable.getMessage()is whereJavaProxyThrowablesquirrels away the "originating"System.Exceptionstack trace.We should update
JavaProxyThrowableso that it usesThrowable.setStackTrace()to merge or replace theSystem.Exceptionstack frames in with theThrowablestack frames.I believe that this will in turn improve integration with e.g. HockeyApp and other apps which utilize
Throwable.printStackTrace().