static void ObjExceptionHandler(object sender, MarshalObjectiveCExceptionEventArgs args) { objcEventArgs.Add(new MarshalObjectiveCExceptionEventArgs() { Exception = args.Exception, ExceptionMode = args.ExceptionMode, }); if (objcTargetMode.HasValue) { args.ExceptionMode = objcTargetMode.Value; } }
private void Runtime_MarshalObjectiveCException(object sender, MarshalObjectiveCExceptionEventArgs args) { Console.WriteLine($"Encountered Marshal Objective-C Exception:\nMode: {args.ExceptionMode}\nException:\n{args.Exception}"); }