[Mono-dev] [PATCH] Extract mono_exception_get_message_string from mono_print_exception
Paolo Molaro
lupus at ximian.com
Fri Jul 2 06:28:39 EDT 2010
On 07/01/10 Michael Hutchinson wrote:
> The attached patch adds a new mono_exception_get_message_string
> function to the Mono public API, extracted from mono_print_exception.
> This makes it possible for embedders easily to convert exceptions to
> strings without printing them and without using private API.
It is already possible to use the embedding API to get the same result
without using any private API, of course.
Anyway, we can certainly add an helper method, but it should be more
general:
MonoString *mono_object_to_string (MonoObject *obj, MonoObject **exc);
Note that it works for any object and that it allows the user to
handle exceptions thrown from the implict method invocation.
The result can be used as is or mono_string_to_utf8 () can be called on
it.
lupus
--
-----------------------------------------------------------------
lupus at debian.org debian/rules
lupus at ximian.com Monkeys do it better
More information about the Mono-devel-list
mailing list