From 4d4bd34e4768a4750f00dd02b44f00a5a0552767 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 16 May 2016 18:08:31 +0200 Subject: [PATCH] [runtime] Use xamarin_process_nsexception instead of xamarin_throw_ns_exception in our generated bindings. This makes the generated bindings play nice with exception marshaling. --- runtime/bindings-generator.cs | 8 ++++---- runtime/bindings.m | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/runtime/bindings-generator.cs b/runtime/bindings-generator.cs index cf8fa313f0d0..cc6caba6644e 100644 --- a/runtime/bindings-generator.cs +++ b/runtime/bindings-generator.cs @@ -1501,7 +1501,7 @@ static void Write_objc_msgSend (StringWriter writer, FunctionData func) // @catch if (func.MarshalExceptions) { writer.WriteLine ("\t} @catch (NSException *e) {"); - writer.WriteLine ("\t\txamarin_throw_ns_exception (e);"); + writer.WriteLine ("\t\txamarin_process_nsexception (e);"); writer.WriteLine ("\t}"); } @@ -1579,7 +1579,7 @@ static void Write_objc_msgSendSuper (StringWriter writer, FunctionData func) // @catch if (func.MarshalExceptions) { writer.WriteLine ("\t} @catch (NSException *e) {"); - writer.WriteLine ("\t\txamarin_throw_ns_exception (e);"); + writer.WriteLine ("\t\txamarin_process_nsexception (e);"); writer.WriteLine ("\t}"); } @@ -1653,7 +1653,7 @@ static void Write_objc_msgSend_stret (StringWriter writer, FunctionData func) // @catch if (func.MarshalExceptions) { writer.WriteLine ("\t} @catch (NSException *e) {"); - writer.WriteLine ("\t\txamarin_throw_ns_exception (e);"); + writer.WriteLine ("\t\txamarin_process_nsexception (e);"); writer.WriteLine ("\t}"); } @@ -1727,7 +1727,7 @@ static void Write_objc_msgSendSuper_stret (StringWriter writer, FunctionData fun // @catch if (func.MarshalExceptions) { writer.WriteLine ("\t} @catch (NSException *e) {"); - writer.WriteLine ("\t\txamarin_throw_ns_exception (e);"); + writer.WriteLine ("\t\txamarin_process_nsexception (e);"); writer.WriteLine ("\t}"); } diff --git a/runtime/bindings.m b/runtime/bindings.m index 2893f5a73822..3be38bf87c28 100644 --- a/runtime/bindings.m +++ b/runtime/bindings.m @@ -29,7 +29,7 @@ return ((float_send) objc_msgSend) (self, sel); #endif } @catch (NSException *e) { - xamarin_throw_ns_exception (e); + xamarin_process_nsexception (e); } } @@ -40,7 +40,7 @@ // there is no objc_msgSendSuper_fpret: http://lists.apple.com/archives/objc-language/2006/Jun/msg00012.html return ((float_sendsuper) objc_msgSendSuper) (super, sel); } @catch (NSException *e) { - xamarin_throw_ns_exception (e); + xamarin_process_nsexception (e); } } @@ -54,7 +54,7 @@ return ((nfloat_send) objc_msgSend) (self, sel); #endif } @catch (NSException *e) { - xamarin_throw_ns_exception (e); + xamarin_process_nsexception (e); } } @@ -65,7 +65,7 @@ // there is no objc_msgSendSuper_fpret: http://lists.apple.com/archives/objc-language/2006/Jun/msg00012.html return ((nfloat_sendsuper) objc_msgSendSuper) (super, sel); } @catch (NSException *e) { - xamarin_throw_ns_exception (e); + xamarin_process_nsexception (e); } }