File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/Java.Interop/Java.Interop
tools/generator/SourceWriters Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -437,6 +437,12 @@ public virtual bool ExceptionShouldTransitionToJni (Exception e)
437437
438438 partial class JniRuntime {
439439
440+ public virtual void OnUserUnhandledException ( ref JniTransition transition , Exception e )
441+ {
442+ transition . SetPendingException ( e ) ;
443+ Debugger . BreakForUserUnhandledException ( e ) ;
444+ }
445+
440446 public virtual void RaisePendingException ( Exception pendingException )
441447 {
442448 JniEnvironment . Exceptions . Throw ( pendingException ) ;
Original file line number Diff line number Diff line change @@ -91,8 +91,7 @@ protected override void WriteBody (CodeWriter writer)
9191
9292 writer . WriteLine ( "} catch (global::System.Exception __e) {" ) ;
9393 writer . Indent ( ) ;
94- writer . WriteLine ( "__envp.SetPendingException (__e);" ) ;
95- writer . WriteLine ( "global::System.Diagnostics.Debugger.BreakForUserUnhandledException (__e);" ) ;
94+ writer . WriteLine ( "JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);" ) ;
9695
9796 if ( ! method . IsVoid )
9897 writer . WriteLine ( "return default;" ) ;
You can’t perform that action at this time.
0 commit comments