[runtime] Don't insta-fail when a faulty COM type is encountered. (#5616)
[mono.git] / mono / utils / mono-error.c
index e193291a569cbb39a78448fd5a90ceda29dcffbd..27f2b62fb248ff784d2f6dbc9b350f98a7613d07 100644 (file)
@@ -176,6 +176,17 @@ mono_error_get_error_code (MonoError *error)
        return error->error_code;
 }
 
+const char*
+mono_error_get_exception_name (MonoError *oerror)
+{
+       MonoErrorInternal *error = (MonoErrorInternal*)oerror;
+
+       if (error->error_code == MONO_ERROR_NONE)
+               return NULL;
+
+       return error->exception_name;
+}
+
 /*Return a pointer to the internal error message, might be NULL.
 Caller should not release it.*/
 const char*