Merge pull request #2680 from lambdageek/dev/reflection-no-loadererror
authormonojenkins <jo.shields+jenkins@xamarin.com>
Mon, 29 Feb 2016 21:15:43 +0000 (21:15 +0000)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Mon, 29 Feb 2016 21:15:43 +0000 (21:15 +0000)
commit797c536463feb7ebf7b3aafdee518404389b726e
tree98d51f9595721d527f4ca338cea6563ab63ce29d
parent185609a22951a72e5cdaefe712c2183a0c8ded04
parent50ae6746df3e1b67f9455ba7786428385753f0b3
Merge pull request #2680 from lambdageek/dev/reflection-no-loadererror

[reflection] Get rid of loader error in reflection.c

Get rid of (direct and indirect) calls to `mono_loader_set_error_from_mono_error` in reflection.c:

- `mono_custom_attrs_from_index`
- `mono_custom_attrs_from_method`
- `mono_custom_attrs_from_class`
- `mono_custom_attrs_from_assembly`
- `mono_custom_attrs_from_module`
- `mono_custom_attrs_from_property`
- `mono_custom_attrs_from_event`
- `mono_custom_attrs_from_field`
- `mono_custom_attrs_from_param`

In all the functions, add a `_checked` variant that has a `MonoError*` out argument and for the  MONO_API functions.  The public API versions just clean up the error and return NULL.  Loader error isn't touched anymore.
mono/metadata/cominterop.c
mono/metadata/marshal.c
mono/metadata/object.c
mono/metadata/reflection.c
mono/mini/method-to-ir.c