You need to check '*exc' not 'exc' to see if an exception was thrown.
On Apr 10, 2014 11:23 AM, "Brian Mavity" <notifications@github.com> wrote:

> In src/mono/monoembed.cpp:
>
> >
> >      if (!method)
> >          method = mono_class_get_method_from_name(MonoEmbedding::GetClass(), "Int64ToDouble", -1);
> >
> >      void* args[] = { mono_object_unbox(i64) };
> >
> > -    return *(double*)mono_object_unbox(mono_runtime_invoke(method, NULL, args, (MonoObject**)&exc));
> > +    MonoObject* obj = mono_runtime_invoke(method, NULL, args, (MonoObject**)exc);
> > +    if (exc)
> > +        return 0.0;
> > +    return *(double*)mono_object_unbox(obj);
>
> Is this acceptable? I wasn't sure, but I thought I'd give it the old
> college try. Seems to work, but... see other note on GetDateValue
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/tjanczuk/edge/pull/116/files#r11490012>
> .
>