On Fri, Jul 2, 2010 at 6:28 AM, Paolo Molaro <lu...@ximian.com> wrote: > 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.
My bad, I hadn't found mono_get_exception_class. > 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 Implemented - new patch attached. I also made mono_string_to_utf8_checked public, as mono_string_to_utf8 is marked deprecated. -- Michael Hutchinson http://mjhutchinson.com
mono-print-exception.diff
Description: Binary data
_______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list