Merge pull request #2516 from lambdageek/monoerror-exception_instance
authormonojenkins <jo.shields+jenkins@xamarin.com>
Tue, 26 Jan 2016 19:15:17 +0000 (19:15 +0000)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Tue, 26 Jan 2016 19:15:17 +0000 (19:15 +0000)
commit0658b3879aaa68b0b1124a56da4845c131fe10b4
tree16f1aafc5445f4f41e65bb7652c2e85687af4418
parent1a2b21803c38f3aeabb6cceef2a0be0309123b66
parent305bfbae4ce3b4b616879578f390f9f540dbe38f
Merge pull request #2516 from lambdageek/monoerror-exception_instance

[runtime] Add MONO_ERROR_EXCEPTION_INSTANCE MonoError

This kind of MonoError can encapsulate a managed MonoException
object.  (For example as a result of mono_runtime_invoke ()).

Issues:

- [x] Memory leak correctness.
    `MonoError` already leaks memory if you simply swallow it without calling `mono_error_cleanup` or some function that calls it (for example `mono_error_raise_exception` or `mono_error_convert_to_exception`).
    Now if we have an encapsulated exception, we'll leak a GC handle unless cleanup happens.