File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
tools/generator/SourceWriters Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -437,6 +437,14 @@ 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+
444+ // TODO: Enable when we move to 'net9.0'
445+ //Debugger.BreakForUserUnhandledException (e);
446+ }
447+
440448 public virtual void RaisePendingException ( Exception pendingException )
441449 {
442450 JniEnvironment . Exceptions . Throw ( pendingException ) ;
Original file line number Diff line number Diff line change 11#nullable enable
2+ virtual Java.Interop.JniRuntime.OnUserUnhandledException(ref Java.Interop.JniTransition transition, System.Exception! e) -> void
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