*
* Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
* Copyright 2004-2009 Novell, Inc (http://www.novell.com)
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
#include <glib.h>
{
char *trace;
MonoString *res;
- if (!exc)
- mono_raise_exception (mono_get_exception_argument_null ("exception"));
+ if (!exc) {
+ mono_set_pending_exception (mono_get_exception_argument_null ("exception"));
+ return NULL;
+ }
trace = mono_exception_get_native_backtrace (exc);
res = mono_string_new (mono_domain_get (), trace);